mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
47e303269d
Issue: During a PAUSED->PLAYING transition when we are rendering an audio buffer in AudioBaseSink we make adjustments to the sink's provided clock i.e. fix clock calibration using the external pipeline clock, within "gst_audio_base_sink_sync_latency function inside gstaudiobasesink.c". For the calibration adjustment we need to get the sink clock time using "gst_audio_clock_get_time". But before calling "gst_audio_clock_get_time" we acquire the Object Lock on the Sink. If sink is a pulsesink, "gst_audio_clock_get_time" internally calls "gst_pulsesink_get_time" which needs to acquire Pulse Audio Main Loop Lock before querying Pulse Audio for its stream time using "pa_stream_get_time". Please see "gst_pulsesink_get_time in pulsesink.c". So the situation here is we have acquired the Object lock on Sink and need PA Main Loop Lock. Now Pulse Audio Main Thread itself might be in the process of posting a stream status message after Paused to Playing transition which in turn acquires the PA Main loop lock and needs the Object Lock on Pulse Sink. This causes a deadlock with the earlier render thread. Fix: Do not acquire the object Lock on Sink before querying the time on PulseSink clock. This is similar to the way we have used get_time at other places in the code. Acquire it after the get_time call. This way PA Main loop will be able to post its stream status message by acquiring the Sink Object lock and will eventually release its Main Loop lock needed for gst_pulsesink_get_time to continue. https://bugzilla.gnome.org/show_bug.cgi?id=736071 |
||
---|---|---|
.. | ||
.gitignore | ||
audio-channels.c | ||
audio-channels.h | ||
audio-format.c | ||
audio-format.h | ||
audio-info.c | ||
audio-info.h | ||
audio.c | ||
audio.def | ||
audio.h | ||
audio.vcproj | ||
audiofilter.vcproj | ||
gstaudiobasesink.c | ||
gstaudiobasesink.h | ||
gstaudiobasesrc.c | ||
gstaudiobasesrc.h | ||
gstaudiocdsrc.c | ||
gstaudiocdsrc.h | ||
gstaudioclock.c | ||
gstaudioclock.h | ||
gstaudiodecoder.c | ||
gstaudiodecoder.h | ||
gstaudioencoder.c | ||
gstaudioencoder.h | ||
gstaudiofilter.c | ||
gstaudiofilter.h | ||
gstaudioiec61937.c | ||
gstaudioiec61937.h | ||
gstaudiometa.c | ||
gstaudiometa.h | ||
gstaudiopack-dist.c | ||
gstaudiopack-dist.h | ||
gstaudiopack.orc | ||
gstaudioringbuffer.c | ||
gstaudioringbuffer.h | ||
gstaudiosink.c | ||
gstaudiosink.h | ||
gstaudiosrc.c | ||
gstaudiosrc.h | ||
Makefile.am | ||
streamvolume.c | ||
streamvolume.h | ||
TODO |