in_str and out_str not initialized
pascal-fb-martin opened this issue · comments
The variables in_str and out_str is not initialized when the -i or -o option is not present. In my case this causes the pipe to ffplay to not work (nothing written to standard output) because out_str was not null and thus out.fd is not set to stdout..
The line:
char *in_str, *out_str;
should be:
char *in_str = NULL, *out_str = NULL;
I also would recommend adding a fflush(out.fd);
after each frame. (I am a bit paranoid when it comes to output buffers, after some bad experiences with sockets.)
My environment: Debian 64 bit (Linux 5.15.3, gcc 10.3.0) on an AMD laptop.