mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
gst/gstelement.c: Only change the state cookie if a different state was set on the element. See #492729.
Original commit message from CVS: * gst/gstelement.c: (gst_element_set_state_func): Only change the state cookie if a different state was set on the element. See #492729.
This commit is contained in:
parent
eac0501386
commit
d5432c2bff
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-11-06 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
|
* gst/gstelement.c: (gst_element_set_state_func):
|
||||||
|
Only change the state cookie if a different state was set on the
|
||||||
|
element. See #492729.
|
||||||
|
|
||||||
2007-11-06 Tim-Philipp Müller <tim at centricular dot net>
|
2007-11-06 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/gstvalue.c:
|
* gst/gstvalue.c:
|
||||||
|
|
|
@ -2300,12 +2300,15 @@ gst_element_set_state_func (GstElement * element, GstState state)
|
||||||
current = GST_STATE (element);
|
current = GST_STATE (element);
|
||||||
next = GST_STATE_NEXT (element);
|
next = GST_STATE_NEXT (element);
|
||||||
old_pending = GST_STATE_PENDING (element);
|
old_pending = GST_STATE_PENDING (element);
|
||||||
/* increment state cookie so that we can track each state change */
|
|
||||||
element->state_cookie++;
|
|
||||||
|
|
||||||
/* this is the (new) state we should go to. TARGET is the last state we set on
|
/* this is the (new) state we should go to. TARGET is the last state we set on
|
||||||
* the element. */
|
* the element. */
|
||||||
GST_STATE_TARGET (element) = state;
|
if (state != GST_STATE_TARGET (element)) {
|
||||||
|
GST_STATE_TARGET (element) = state;
|
||||||
|
/* increment state cookie so that we can track each state change. We only do
|
||||||
|
* this if this is actually a new state change. */
|
||||||
|
element->state_cookie++;
|
||||||
|
}
|
||||||
GST_STATE_PENDING (element) = state;
|
GST_STATE_PENDING (element) = state;
|
||||||
|
|
||||||
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, element,
|
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, element,
|
||||||
|
|
Loading…
Reference in a new issue