summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/play/play.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/play/play.c')
-rw-r--r--gst-libs/gst/play/play.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index 0fac17bf..dfa73fd9 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -457,6 +457,16 @@ gst_play_state_change (GstElement *element, GstElementState old,
(GSourceFunc) gst_play_get_length_callback,
play);
}
+ else {
+ if (play->priv->tick_id) {
+ g_source_remove (play->priv->tick_id);
+ play->priv->tick_id = 0;
+ }
+ if (play->priv->length_id) {
+ g_source_remove (play->priv->length_id);
+ play->priv->length_id = 0;
+ }
+ }
if (GST_ELEMENT_CLASS (parent_class)->state_change)
GST_ELEMENT_CLASS (parent_class)->state_change (element, old, state);