mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
playbin2: do not take a superfluous ref on uridecodebin instances
... which are no longer FLOATING.
This commit is contained in:
parent
5fee17ac8f
commit
8c99412a0d
1 changed files with 8 additions and 2 deletions
|
@ -3541,7 +3541,10 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target)
|
|||
GST_DEBUG_OBJECT (playbin, "reusing existing uridecodebin");
|
||||
uridecodebin = group->uridecodebin;
|
||||
gst_element_set_state (uridecodebin, GST_STATE_READY);
|
||||
gst_bin_add (GST_BIN_CAST (playbin), gst_object_ref (uridecodebin));
|
||||
/* no need to take extra ref, we already have one
|
||||
* and the bin will add one since it is no longer floating,
|
||||
* as it was at least added once before (below) */
|
||||
gst_bin_add (GST_BIN_CAST (playbin), uridecodebin);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (playbin, "making new uridecodebin");
|
||||
uridecodebin = gst_element_factory_make ("uridecodebin", NULL);
|
||||
|
@ -3604,7 +3607,10 @@ activate_group (GstPlayBin * playbin, GstSourceGroup * group, GstState target)
|
|||
GST_DEBUG_OBJECT (playbin, "reusing existing suburidecodebin");
|
||||
suburidecodebin = group->suburidecodebin;
|
||||
gst_element_set_state (suburidecodebin, GST_STATE_READY);
|
||||
gst_bin_add (GST_BIN_CAST (playbin), gst_object_ref (suburidecodebin));
|
||||
/* no need to take extra ref, we already have one
|
||||
* and the bin will add one since it is no longer floating,
|
||||
* as it was at least added once before (below) */
|
||||
gst_bin_add (GST_BIN_CAST (playbin), suburidecodebin);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (playbin, "making new suburidecodebin");
|
||||
suburidecodebin = gst_element_factory_make ("uridecodebin", NULL);
|
||||
|
|
Loading…
Reference in a new issue