mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 02:45:35 +00:00
discoverer: Remove probe when done
This commit is contained in:
parent
51eeb4534a
commit
4636b8dd6f
1 changed files with 6 additions and 1 deletions
|
@ -75,6 +75,7 @@ typedef struct
|
||||||
GstTagList *tags;
|
GstTagList *tags;
|
||||||
GstToc *toc;
|
GstToc *toc;
|
||||||
gchar *stream_id;
|
gchar *stream_id;
|
||||||
|
gulong probe_id;
|
||||||
} PrivateStream;
|
} PrivateStream;
|
||||||
|
|
||||||
struct _GstDiscovererPrivate
|
struct _GstDiscovererPrivate
|
||||||
|
@ -641,6 +642,7 @@ uridecodebin_pad_added_cb (GstElement * uridecodebin, GstPad * pad,
|
||||||
if (is_subtitle_caps (caps)) {
|
if (is_subtitle_caps (caps)) {
|
||||||
/* Subtitle streams are sparse and may not provide any information - don't
|
/* Subtitle streams are sparse and may not provide any information - don't
|
||||||
* wait for data to preroll */
|
* wait for data to preroll */
|
||||||
|
ps->probe_id =
|
||||||
gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
|
gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
|
||||||
(GstPadProbeCallback) got_subtitle_data, dc, NULL);
|
(GstPadProbeCallback) got_subtitle_data, dc, NULL);
|
||||||
g_object_set (ps->sink, "async", FALSE, NULL);
|
g_object_set (ps->sink, "async", FALSE, NULL);
|
||||||
|
@ -726,6 +728,9 @@ uridecodebin_pad_removed_cb (GstElement * uridecodebin, GstPad * pad,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ps->probe_id)
|
||||||
|
gst_pad_remove_probe (pad, ps->probe_id);
|
||||||
|
|
||||||
dc->priv->streams = g_list_delete_link (dc->priv->streams, tmp);
|
dc->priv->streams = g_list_delete_link (dc->priv->streams, tmp);
|
||||||
DISCO_UNLOCK (dc);
|
DISCO_UNLOCK (dc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue