test/run_filter: move the buffer into the loop
This commit is contained in:
parent
d7838950d8
commit
b4dc2c07d5
@ -62,8 +62,6 @@ LoadFilter(const ConfigData &config, const char *name)
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
try {
|
try {
|
||||||
char buffer[4096];
|
|
||||||
|
|
||||||
if (argc < 3 || argc > 4) {
|
if (argc < 3 || argc > 4) {
|
||||||
fprintf(stderr, "Usage: run_filter CONFIG NAME [FORMAT] <IN\n");
|
fprintf(stderr, "Usage: run_filter CONFIG NAME [FORMAT] <IN\n");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
@ -98,6 +96,8 @@ try {
|
|||||||
/* play */
|
/* play */
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
char buffer[4096];
|
||||||
|
|
||||||
ssize_t nbytes;
|
ssize_t nbytes;
|
||||||
|
|
||||||
nbytes = read(0, buffer, sizeof(buffer));
|
nbytes = read(0, buffer, sizeof(buffer));
|
||||||
|
Loading…
Reference in New Issue
Block a user