mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
avdemux: check AVIO Context has been allocated
This commit is contained in:
parent
904b53ab0d
commit
e3b8a4fe23
1 changed files with 3 additions and 0 deletions
|
@ -1155,6 +1155,9 @@ gst_ffmpegdemux_open (GstFFMpegDemux * demux)
|
||||||
else
|
else
|
||||||
res = gst_ffmpeg_pipe_open (&demux->ffpipe, AVIO_FLAG_READ, &iocontext);
|
res = gst_ffmpeg_pipe_open (&demux->ffpipe, AVIO_FLAG_READ, &iocontext);
|
||||||
|
|
||||||
|
if (res < 0)
|
||||||
|
goto open_failed;
|
||||||
|
|
||||||
demux->context = avformat_alloc_context ();
|
demux->context = avformat_alloc_context ();
|
||||||
demux->context->pb = iocontext;
|
demux->context->pb = iocontext;
|
||||||
res = avformat_open_input (&demux->context, NULL, oclass->in_plugin, NULL);
|
res = avformat_open_input (&demux->context, NULL, oclass->in_plugin, NULL);
|
||||||
|
|
Loading…
Reference in a new issue