<div dir="ltr">In <i><b>gst_audio_base_sink_skew_slaving</b></i> inside <i><b>gst-plugins-base/gst-libs/gst/audio/gstaudiobasesink.c </b></i>we call <i><b>gst_audio_clock_get_time</b> </i>on <i><b>sink->provided_clock</b></i> without acquiring the <b><i>GST_OBJECT_LOCK(sink)</i>.</b> Can we do the same in this case?<div>
<br></div><div>Something like:</div><div><br></div><div><div><font color="#cc0000">+diff --git a/gst-libs/gst/audio/gstaudiobasesink.c b/gst-libs/gst/audio/gstaudiobasesink.c</font></div><div><font color="#cc0000">+index 26f7134..76ddff1 100644</font></div>
<div><font color="#cc0000">+--- a/gst-libs/gst/audio/gstaudiobasesink.c</font></div><div><font color="#cc0000">++++ b/gst-libs/gst/audio/gstaudiobasesink.c</font></div><div><font color="#cc0000">+@@ -1471,7 +1471,14 @@ gst_audio_base_sink_sync_latency (GstBaseSink * bsink, GstMiniObject * obj)</font></div>
<div><font color="#cc0000">+ * our internal clock should exactly have been the latency (== the running</font></div><div><font color="#cc0000">+ * time of the external clock) */</font></div><div><font color="#cc0000">+ etime = GST_ELEMENT_CAST (sink)->base_time + time;</font></div>
<div><font color="#cc0000">++</font></div><div><font color="#cc0000">++ // Release the sink object lock before trying to get the time on PulseSink. The</font></div><div><font color="#cc0000">++ // get_time call needs to acquire the pulse audio main loop lock. This can cause</font></div>
<div><font color="#cc0000">++ // a deadlock with the PA thread which in turn has acquired its main loop lock</font></div><div><font color="#cc0000">++ // and now needs to acquire Object lock on the sink.</font></div><div>
<font color="#cc0000"><b>++ GST_OBJECT_UNLOCK (sink);</b></font></div><div><font color="#cc0000"><b>+ itime = gst_audio_clock_get_time (sink->provided_clock);</b></font></div><div><font color="#cc0000"><b>++ GST_OBJECT_LOCK (sink);</b></font></div>
<div><font color="#cc0000">+ itime = gst_audio_clock_adjust (sink->provided_clock, itime);</font></div><div><font color="#cc0000">+ </font></div><div><font color="#cc0000">+ if (status == GST_CLOCK_EARLY) {</font></div>
</div><div><br></div><div>Thanks</div><div>Akshay</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 2 September 2014 19:00, Nicolas Dufresne <span dir="ltr"><<a href="mailto:nicolas.dufresne@collabora.com" target="_blank">nicolas.dufresne@collabora.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<br>
<div>Le 2014-09-02 19:56, Akshay Garg a
écrit :<br>
</div><div class="">
<blockquote type="cite">
<div><br>
</div>
<div>Was wondering if there was a bug filed/fix merged for the
following issue:</div>
<div><br>
</div>
<div><a href="http://gstreamer-devel.966125.n4.nabble.com/pulsesink-deadlock-in-gst-pulsesink-get-time-td4660682.html#a4662193" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/pulsesink-deadlock-in-gst-pulsesink-get-time-td4660682.html#a4662193</a><br>
</div>
<div><br>
</div>
<div><span style="font-family:arial,sans-serif;font-size:13px">I'm
currently using gst-plugins-good-1.2.0 and still see it.</span></div>
</blockquote>
<br></div>
I've seen this in the past after few pulseaudio crash. I recommend
to update pulseaudio.<span class="HOEnZb"><font color="#888888"><br>
<br>
Nicolas<br>
<br>
</font></span></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>