diff --git a/mythtv/libs/libmyth/audio/audiooutputpulse.cpp b/mythtv/libs/libmyth/audio/audiooutputpulse.cpp
index f58a732..3515a67 100644
|
a
|
b
|
void AudioOutputPulseAudio::WriteAudio(uchar *aubuf, int size)
|
| 286 | 286 | |
| 287 | 287 | int AudioOutputPulseAudio::GetBufferedOnSoundcard(void) const |
| 288 | 288 | { |
| 289 | | pa_usec_t latency = (pa_usec_t) -1; |
| | 289 | pa_usec_t latency = 0; |
| | 290 | int latency_negative = 0; |
| 290 | 291 | size_t buffered = 0; |
| 291 | 292 | |
| 292 | 293 | if (!pcontext || pa_context_get_state(pcontext) != PA_CONTEXT_READY) |
| … |
… |
int AudioOutputPulseAudio::GetBufferedOnSoundcard(void) const
|
| 301 | 302 | |
| 302 | 303 | pa_threaded_mainloop_lock(mainloop); |
| 303 | 304 | |
| 304 | | while (pa_stream_get_latency(pstream, &latency, NULL) < 0) |
| | 305 | while (pa_stream_get_latency(pstream, &latency, &latency_negative) < 0) |
| 305 | 306 | { |
| 306 | 307 | if (pa_context_errno(pcontext) != PA_ERR_NODATA) |
| 307 | 308 | { |
| … |
… |
int AudioOutputPulseAudio::GetBufferedOnSoundcard(void) const
|
| 313 | 314 | |
| 314 | 315 | pa_threaded_mainloop_unlock(mainloop); |
| 315 | 316 | |
| 316 | | if (latency < 0) |
| | 317 | if (latency_negative) |
| 317 | 318 | { |
| 318 | 319 | latency = 0; |
| 319 | 320 | } |