decodebin: fix event leak
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 6 Oct 2015 13:20:51 +0000 (15:20 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 25 Oct 2015 11:26:20 +0000 (11:26 +0000)
As stated in GST_PAD_PROBE_HANDLED's documentation, we are
supposed to unref the event before returning.

Fixes an event leak in the validate.hls.playback.play_15s.hls_bibbop
validate scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=754459

gst/playback/gstdecodebin2.c

index cf3a2d1..d5bd5ee 100644 (file)
@@ -2931,6 +2931,7 @@ sink_pad_event_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
         if (otherpeer) {
           GST_DEBUG_OBJECT (otherpeer, "Attempting to forward event");
           if (gst_pad_send_event (otherpeer, gst_event_ref (event))) {
+            gst_event_unref (event);
             proberet = GST_PAD_PROBE_HANDLED;
           }
           gst_object_unref (otherpeer);