mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
uridecodebin: clean up decodebin properties
When reusing a decodebin2 element, clear the properties we might have changed, to their default values or else we might end up with old configuration. Fixes #608484
This commit is contained in:
parent
16601b09fe
commit
fd755182b1
1 changed files with 8 additions and 0 deletions
|
@ -1173,10 +1173,18 @@ remove_decoders (GstURIDecodeBin * bin, gboolean force)
|
|||
gst_element_set_state (decoder, GST_STATE_NULL);
|
||||
gst_bin_remove (GST_BIN_CAST (bin), decoder);
|
||||
} else {
|
||||
GstCaps *caps;
|
||||
|
||||
gst_element_set_state (decoder, GST_STATE_READY);
|
||||
/* add it to our list of pending decodebins */
|
||||
g_object_ref (decoder);
|
||||
gst_bin_remove (GST_BIN_CAST (bin), decoder);
|
||||
/* restore some properties we might have changed */
|
||||
g_object_set (G_OBJECT (decoder), "sink-caps", NULL, NULL);
|
||||
caps = DEFAULT_CAPS;
|
||||
g_object_set (G_OBJECT (decoder), "caps", caps, NULL);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
bin->pending_decodebins =
|
||||
g_slist_prepend (bin->pending_decodebins, decoder);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue