avdemux: check AVIO Context has been allocated

This commit is contained in:
Luis de Bethencourt 2015-03-05 14:23:44 +00:00
parent 904b53ab0d
commit e3b8a4fe23

View file

@ -1155,6 +1155,9 @@ gst_ffmpegdemux_open (GstFFMpegDemux * demux)
else
res = gst_ffmpeg_pipe_open (&demux->ffpipe, AVIO_FLAG_READ, &iocontext);
if (res < 0)
goto open_failed;
demux->context = avformat_alloc_context ();
demux->context->pb = iocontext;
res = avformat_open_input (&demux->context, NULL, oclass->in_plugin, NULL);