flvdemux: fix eos event leak
authorHavard Graff <havard.graff@gmail.com>
Thu, 3 Dec 2015 13:46:12 +0000 (00:46 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 19 Feb 2016 14:54:04 +0000 (14:54 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=762209

gst/flv/gstflvdemux.c

index 19765f7353d9bab4c31af8b988c8a357c9706777..70e7fba36ed6e6f2c5dce242c2507531b57e03a4 100644 (file)
@@ -3145,10 +3145,11 @@ gst_flv_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
         gst_object_unref (index);
       }
 
-      if (!demux->audio_pad && !demux->video_pad)
+      if (!demux->audio_pad && !demux->video_pad) {
         GST_ELEMENT_ERROR (demux, STREAM, FAILED,
             ("Internal data stream error."), ("Got EOS before any data"));
-      else {
+        gst_event_unref (event);
+      } else {
         if (!demux->no_more_pads) {
           gst_element_no_more_pads (GST_ELEMENT (demux));
           demux->no_more_pads = TRUE;