mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-09 05:11:53 +00:00
playbin2: don't leak selector when getting current stream numbers.
This commit is contained in:
parent
88110ea67e
commit
a0959afb01
1 changed files with 1 additions and 3 deletions
|
@ -1230,6 +1230,7 @@ get_current_stream_number (GstPlayBin * playbin, GPtrArray * channels)
|
|||
pad = g_ptr_array_index (channels, i);
|
||||
if ((selector = gst_pad_get_parent (pad))) {
|
||||
g_object_get (selector, "active-pad", ¤t, NULL);
|
||||
gst_object_unref (selector);
|
||||
|
||||
if (pad == current) {
|
||||
gst_object_unref (current);
|
||||
|
@ -1242,9 +1243,6 @@ get_current_stream_number (GstPlayBin * playbin, GPtrArray * channels)
|
|||
}
|
||||
}
|
||||
|
||||
if (selector)
|
||||
gst_object_unref (selector);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue