Commit bbe88b19 authored by Matthew Waters's avatar Matthew Waters 🐨

autodetect: bring the element state down after success

Otherwise some messages that are emitted by the element on NULL->READY
will not reach the application.

https://bugzilla.gnome.org/show_bug.cgi?id=764947
parent 12ad37fd
......@@ -310,6 +310,7 @@ gst_auto_detect_find_best (GstAutoDetect * self)
ret = gst_element_set_state (el, GST_STATE_READY);
if (ret == GST_STATE_CHANGE_SUCCESS) {
GST_DEBUG_OBJECT (self, "This worked!");
gst_element_set_state (el, GST_STATE_NULL);
choice = el;
break;
}
......@@ -379,14 +380,13 @@ gst_auto_detect_detect (GstAutoDetect * self)
}
self->kid = kid;
/* Ensure the child is brought up to the right state to match the parent.
* Although it's currently always in READY and we're always doing NULL->READY.
*/
if (GST_STATE (self->kid) < GST_STATE (self))
gst_element_set_state (self->kid, GST_STATE (self));
gst_bin_add (GST_BIN (self), kid);
/* Ensure the child is brought up to the right state to match the parent. */
if (GST_STATE (self->kid) < GST_STATE (self))
gst_element_set_state (self->kid, GST_STATE (self));
/* attach ghost pad */
GST_DEBUG_OBJECT (self, "Re-assigning ghostpad");
if (!gst_auto_detect_attach_ghost_pad (self))
......
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