mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
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
This commit is contained in:
parent
12ad37fdb3
commit
bbe88b190b
1 changed files with 5 additions and 5 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue