Commit fd755182 authored by Wim Taymans's avatar Wim Taymans Committed by Wim Taymans
Browse files

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
parent 16601b09
......@@ -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);
g_object_set (G_OBJECT (decoder), "caps", caps, NULL);
gst_caps_unref (caps);
bin->pending_decodebins =
g_slist_prepend (bin->pending_decodebins, decoder);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment