I have the following code:
av_register_all();
pFormatCtx = avformat_alloc_context();
const char* input = "pipe:";
AVInputFormat* iFormat = av_find_input_format("mpegts");
if ( avformat_open_input(&pFormatCtx, input, iFormat, NULL) != 0 )
return -1;
int res = av_find_stream_info(pFormatCtx);
when my input is a regular file, this works nicely and pFormatCtx is populated with the streams in the file. However, when i set input to "pipe:", av_find_stream_info returns with -1.
I am using the same file and piping it by running
cat mpeg.ts | myApp
Any ideas?
Thanks, Aliza