From e5828c82950bb9edeb4114005e8b2b62d286db7d Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 1 Oct 2022 04:37:05 +1000 Subject: [PATCH] decodebin3: Don't lose a ref on EOS event Make sure not to give away the ref on the final EOS event for which the probe handler is returning GST_PAD_PROBE_REMOVE when pushing the event manually. Part-of: --- subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 94d64cfd81..32e8ee4126 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -2070,10 +2070,8 @@ multiqueue_src_probe (GstPad * pad, GstPadProbeInfo * info, "last EOS for input, forwarding and removing slot"); peer = gst_pad_get_peer (pad); if (peer) { - gst_pad_send_event (peer, ev); + gst_pad_send_event (peer, gst_event_ref (ev)); gst_object_unref (peer); - } else { - gst_event_unref (ev); } SELECTION_LOCK (dbin); /* FIXME : Shouldn't we try to re-assign the output instead of just