diff options
author | Josep Torra <n770galaxy@gmail.com> | 2009-06-17 16:17:27 +0200 |
---|---|---|
committer | Josep Torra <n770galaxy@gmail.com> | 2009-06-17 16:17:27 +0200 |
commit | 5d0b8a7489224ec51bef707bab3c9a10f55fe655 (patch) | |
tree | dba4a73c2e9af3a8170b1b5e3360691ae586a913 /gst | |
parent | 7ad8d2e54c36962f1379d245398dc2f9d52ee600 (diff) |
gstelement: unref the clock when the element changes to null state
Diffstat (limited to 'gst')
-rw-r--r-- | gst/gstelement.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/gstelement.c b/gst/gstelement.c index 4fc095b92..c27c68647 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -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, |