mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 22:46:24 +00:00
pulsesink: use acquired flag when checking valid state
Use the acquired field of the ringbuffer in get_time to know when we are in an invalid state. We don't clear the rate flag when releasing the ringbuffer so this values is not usable. Avoids some error messages being posted because the pulseaudio connection is down.
This commit is contained in:
parent
1a2135ee0e
commit
0694be2a82
1 changed files with 1 additions and 1 deletions
|
@ -1591,7 +1591,7 @@ gst_pulsesink_get_time (GstClock * clock, GstBaseAudioSink * sink)
|
|||
GstPulseRingBuffer *pbuf;
|
||||
pa_usec_t time;
|
||||
|
||||
if (sink->ringbuffer == NULL || sink->ringbuffer->spec.rate == 0)
|
||||
if (!sink->ringbuffer || !sink->ringbuffer->acquired)
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
|
||||
pbuf = GST_PULSERING_BUFFER_CAST (sink->ringbuffer);
|
||||
|
|
Loading…
Reference in a new issue