basesink: Don't forget to unref the cached ClockId
authorEdward Hervey <bilboed@bilboed.com>
Sun, 5 Dec 2010 14:58:48 +0000 (15:58 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Sun, 5 Dec 2010 14:58:48 +0000 (15:58 +0100)
libs/gst/base/gstbasesink.c

index 82b618f..7a3fb74 100644 (file)
@@ -4939,6 +4939,10 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
       priv->current_sstart = GST_CLOCK_TIME_NONE;
       priv->current_sstop = GST_CLOCK_TIME_NONE;
       priv->have_latency = FALSE;
+      if (priv->cached_clock_id) {
+        gst_clock_id_unref (priv->cached_clock_id);
+        priv->cached_clock_id = NULL;
+      }
       GST_OBJECT_UNLOCK (basesink);
 
       gst_base_sink_set_last_buffer (basesink, NULL);