mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
playbin2: Don't destroy the suburidecodebin on errors
It can still be reused
This commit is contained in:
parent
497d0a4793
commit
4de2ab48ea
1 changed files with 5 additions and 4 deletions
|
@ -1887,9 +1887,7 @@ gst_play_bin_handle_message (GstBin * bin, GstMessage * msg)
|
|||
gst_object_ref (group->suburidecodebin);
|
||||
gst_bin_remove (bin, group->suburidecodebin);
|
||||
gst_element_set_locked_state (group->suburidecodebin, FALSE);
|
||||
gst_element_set_state (group->suburidecodebin, GST_STATE_NULL);
|
||||
gst_object_unref (group->suburidecodebin);
|
||||
group->suburidecodebin = NULL;
|
||||
gst_element_set_state (group->suburidecodebin, GST_STATE_READY);
|
||||
|
||||
no_more_pads_cb (NULL, group);
|
||||
}
|
||||
|
@ -2813,7 +2811,10 @@ deactivate_group (GstPlayBin * playbin, GstSourceGroup * group)
|
|||
REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_added_id);
|
||||
REMOVE_SIGNAL (group->suburidecodebin, group->sub_pad_removed_id);
|
||||
REMOVE_SIGNAL (group->suburidecodebin, group->sub_no_more_pads_id);
|
||||
gst_bin_remove (GST_BIN_CAST (playbin), group->suburidecodebin);
|
||||
|
||||
/* Might already be removed because of errors */
|
||||
if (GST_OBJECT_PARENT (group->suburidecodebin) == GST_OBJECT_CAST (playbin))
|
||||
gst_bin_remove (GST_BIN_CAST (playbin), group->suburidecodebin);
|
||||
}
|
||||
|
||||
GST_SOURCE_GROUP_UNLOCK (group);
|
||||
|
|
Loading…
Reference in a new issue