Commit 5e2cb462 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

PulseAudio: remove broken logic

sys->first_pts is the time the stream started originally, but was
mistaken as the time of the stream was paused.

Now, it is assumed that pausing and resuming take approximately the
same time. This is usually true, and if it is not, there is no way for
either VLC or PulseAudio to know (since ALSA does not expose
pause/resume latency informations for the underlying devices).

In practice, this makes no real difference other than removing a bogus
warning about being late when resuming from pause.
parent c7a7824f
...@@ -570,10 +570,8 @@ static void Pause(audio_output_t *aout, bool paused, mtime_t date) ...@@ -570,10 +570,8 @@ static void Pause(audio_output_t *aout, bool paused, mtime_t date)
msg_Dbg(aout, "resuming after %"PRId64" us", date); msg_Dbg(aout, "resuming after %"PRId64" us", date);
sys->paused = VLC_TS_INVALID; sys->paused = VLC_TS_INVALID;
if (sys->first_pts != VLC_TS_INVALID) { if (likely(sys->first_pts != VLC_TS_INVALID))
sys->first_pts += date; stream_start_now(s, aout);
stream_start(s, aout);
}
} }
pa_threaded_mainloop_unlock(sys->mainloop); pa_threaded_mainloop_unlock(sys->mainloop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment