mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
gstelement: unref the clock when the element changes to null state
This commit is contained in:
parent
7ad8d2e54c
commit
5d0b8a7489
1 changed files with 8 additions and 0 deletions
|
@ -2578,6 +2578,14 @@ gst_element_change_state (GstElement * element, GstStateChange transition)
|
|||
/* we can commit the state now which will proceeed to
|
||||
* the next state */
|
||||
ret = gst_element_continue_state (element, ret);
|
||||
/* In null state release the reference to the clock */
|
||||
if (GST_STATE (element) == GST_STATE_NULL) {
|
||||
GstClock **clock_p;
|
||||
GST_OBJECT_LOCK (element);
|
||||
clock_p = &element->clock;
|
||||
gst_object_replace ((GstObject **) clock_p, NULL);
|
||||
GST_OBJECT_UNLOCK (element);
|
||||
}
|
||||
break;
|
||||
case GST_STATE_CHANGE_NO_PREROLL:
|
||||
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, element,
|
||||
|
|
Loading…
Reference in a new issue