summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-03-05 14:23:44 +0000
committerLuis de Bethencourt <luis.bg@samsung.com>2015-03-05 14:23:44 +0000
commite3b8a4fe230d00246254883788304596daa3449b (patch)
treed0582fe5e24fa8a37909d358523c628e471676ee /ext
parent904b53ab0deafdd38109e3fa29dfcb676ac2a539 (diff)
avdemux: check AVIO Context has been allocated
Diffstat (limited to 'ext')
-rw-r--r--ext/libav/gstavdemux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/libav/gstavdemux.c b/ext/libav/gstavdemux.c
index 917838c..a5966cd 100644
--- a/ext/libav/gstavdemux.c
+++ b/ext/libav/gstavdemux.c
@@ -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);