From 74b769751d09fceb0417242c250ab52d0689e567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 21 Feb 2014 13:18:47 +0000 Subject: [PATCH] avvidec: don't crash on EOS when no buffers have been received Fixes crash on EOS when no buffers have been received for some reason, e.g. because the parser didn't output any. fakesrc num-buffers=0 format=time ! avdec_h264 ! fakesink --- ext/libav/gstavviddec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index b4edb363d5..01ca9dec66 100644 --- a/ext/libav/gstavviddec.c +++ b/ext/libav/gstavviddec.c @@ -1475,6 +1475,9 @@ gst_ffmpegviddec_drain (GstFFMpegVidDec * ffmpegdec) { GstFFMpegVidDecClass *oclass; + if (!ffmpegdec->opened) + return; + oclass = (GstFFMpegVidDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec)); if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {