From: Edward Hervey Date: Wed, 15 Nov 2017 09:45:39 +0000 (+0100) Subject: discoverer: Remove probe when done X-Git-Tag: 1.16.2~997 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4636b8dd6fa779f299f332d219025cb0270f6391;p=platform%2Fupstream%2Fgst-plugins-base.git discoverer: Remove probe when done --- diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index 48e7686..68a06bf 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -75,6 +75,7 @@ typedef struct GstTagList *tags; GstToc *toc; gchar *stream_id; + gulong probe_id; } PrivateStream; struct _GstDiscovererPrivate @@ -641,7 +642,8 @@ uridecodebin_pad_added_cb (GstElement * uridecodebin, GstPad * pad, if (is_subtitle_caps (caps)) { /* Subtitle streams are sparse and may not provide any information - don't * wait for data to preroll */ - gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, + ps->probe_id = + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, (GstPadProbeCallback) got_subtitle_data, dc, NULL); g_object_set (ps->sink, "async", FALSE, NULL); DISCO_LOCK (dc); @@ -726,6 +728,9 @@ uridecodebin_pad_removed_cb (GstElement * uridecodebin, GstPad * pad, return; } + if (ps->probe_id) + gst_pad_remove_probe (pad, ps->probe_id); + dc->priv->streams = g_list_delete_link (dc->priv->streams, tmp); DISCO_UNLOCK (dc);