From: Olivier CrĂȘte Date: Mon, 22 May 2017 22:51:12 +0000 (+0200) Subject: basesrc: Hold object lock while updating latency X-Git-Tag: 1.16.2~757 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67a496c0c297ebd306269ffd6f54fae47c72b039;p=platform%2Fupstream%2Fgstreamer.git basesrc: Hold object lock while updating latency Otherwise in gst_base_src_query_latency(), it ended up sometimes thinking it wasn't -1 when it was actually. --- diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 1e50db2..d42ae06 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -3664,7 +3664,9 @@ gst_base_src_set_playing (GstBaseSrc * basesrc, gboolean live_play) bclass->unlock_stop (basesrc); /* for live sources we restart the timestamp correction */ + GST_OBJECT_LOCK (basesrc); basesrc->priv->latency = -1; + GST_OBJECT_UNLOCK (basesrc); /* have to restart the task in case it stopped because of the unlock when * we went to PAUSED. Only do this if we operating in push mode. */ GST_OBJECT_LOCK (basesrc->srcpad);