Hi all,
I am having trouble when trying to open a XVID encoded video file
with libav. GDB points be to the code segment below, when it refers to
the line: throw "Didn't find a video stream!";
// Register all formats and codecs
av_register_all();
// Open video file
if(av_open_input_file(&pFormatCtx, inputFile, NULL, 0, NULL)!=0)
throw "Couldn not open file!";
// Retrieve stream information
if(av_find_stream_info(pFormatCtx)<0)
throw "Couldn not find stream information!";
// Dump information about file onto standard error
dump_format(pFormatCtx, 0, inputFile, false);
// Find the first video stream
videoStream=-1;
for(uint i=0; i<pFormatCtx->nb_streams; i++)
if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO)
{
videoStream=i;
break;
}
if(videoStream==-1)
throw "Didn't find a video stream!";
It is strange because it is able to read the stream information of the
video file but not the content.
Other video files, encoded the same way, are OK. It seems to randomly
not be able to read particular videos.
Anybody an idea what's the problem?
Thanks,
Damian
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user