From f0399ed43597df0a498fcfc1e5be2c720632c0c8 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 10 Apr 2018 09:31:32 -0300 Subject: [PATCH] urisourcebin: Avoid unreffing a pad we are not owning expose_output_pad takes ownership of the pad. --- gst/playback/gsturisourcebin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/playback/gsturisourcebin.c b/gst/playback/gsturisourcebin.c index 3e0d26db17..00162184fd 100644 --- a/gst/playback/gsturisourcebin.c +++ b/gst/playback/gsturisourcebin.c @@ -1454,13 +1454,16 @@ analyse_source (GstURISourceBin * urisrc, gboolean * is_raw, gst_object_unref (pad); pad = slot->srcpad; } else { - pad = create_output_pad (urisrc, pad); + GstPad *tmppad = create_output_pad (urisrc, pad); + gst_object_unref (pad); + + pad = tmppad; } GST_URI_SOURCE_BIN_UNLOCK (urisrc); expose_output_pad (urisrc, pad); + } else { gst_object_unref (pad); } - gst_object_unref (pad); g_value_reset (&item); break; }