Browse Source

pipewire: send timing reports earlier

The timing can now be sent just after pw is starting, the timing
audio_ts will very likely be VLC_TICK_0 (or first_pts).

This fixes video glitches on startup.
pull/172/head
Thomas Guillem 2 years ago
committed by Steve Lhomme
parent
commit
0d323b50d7
  1. 6
      modules/audio_output/pipewire.c

6
modules/audio_output/pipewire.c

@ -194,8 +194,10 @@ static void stream_process(void *data)
memset(dst, 0, skip);
dst += skip;
room -= skip;
} else if (s->time.pts != VLC_TICK_INVALID && now >= s->time.next_update
&& s->first_pts != VLC_TICK_INVALID) {
}
if (!s->starting && s->time.pts != VLC_TICK_INVALID
&& now >= s->time.next_update && s->first_pts != VLC_TICK_INVALID) {
vlc_tick_t elapsed = now - s->time.pts;
/* A sample injected now would be delayed by the following amount of vlc_tick_t */
vlc_tick_t delay = vlc_tick_from_samples(s->time.frames, s->time.rate)

Loading…
Cancel
Save