mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
playbin2: avoid leaking selector request pads
This commit is contained in:
parent
d4e1ff012d
commit
3b0fc1e4fb
1 changed files with 11 additions and 1 deletions
|
@ -3182,7 +3182,6 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target)
|
|||
else
|
||||
g_object_set (uridecodebin, "download", FALSE, NULL);
|
||||
|
||||
|
||||
/* configure subtitle encoding */
|
||||
g_object_set (uridecodebin, "subtitle-encoding", playbin->encoding, NULL);
|
||||
/* configure uri */
|
||||
|
@ -3368,6 +3367,17 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group)
|
|||
}
|
||||
|
||||
if (select->selector) {
|
||||
gint n;
|
||||
|
||||
/* release and unref requests pad from the selector */
|
||||
for (n = 0; n < select->channels->len; n++) {
|
||||
GstPad *sinkpad = g_ptr_array_index (select->channels, n);
|
||||
|
||||
gst_element_release_request_pad (select->selector, sinkpad);
|
||||
gst_object_unref (sinkpad);
|
||||
}
|
||||
g_ptr_array_set_size (select->channels, 0);
|
||||
|
||||
gst_element_set_state (select->selector, GST_STATE_NULL);
|
||||
gst_bin_remove (GST_BIN_CAST (playbin), select->selector);
|
||||
select->selector = NULL;
|
||||
|
|
Loading…
Reference in a new issue