New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ao/pulse: repeated forward seeking in certain files may mess up #10333
Comments
This happens because [cplayer] first video frame after restart shown [cplayer] audio ready [ao/pulse] delay = 0.000000 [cplayer] = 145.658776 - 1.000000 * 0.265760 [cplayer] starting audio playback [ao/pulse] delay = 0.000000 [cplayer] = 145.658776 - 1.000000 * 0.265760 [cplayer] current audio pts 145.393016 [ao/pulse] delay = 0.000000 [vo/gpu/x11] Disabling screensaver. [cplayer] playback restart complete @ 145.393016, audio=playing, video=eof [ao/pulse] starting AO [ao/pulse] delay = 7.116190 [cplayer] = 145.658776 - 1.000000 * 7.281950 [cplayer] current audio pts 138.376826 [ao/pulse] delay = 7.116190 [ao/pulse] delay = 0.160249 [cplayer] = 145.763265 - 1.000000 * 0.371927 [cplayer] current audio pts 145.391338 [ao/pulse] delay = 0.160228 [ao/pulse] delay = 0.159251 [cplayer] = 145.763265 - 1.000000 * 0.370929 [cplayer] current audio pts 145.392336 [ao/pulse] delay = 0.158261 [cplayer] = 145.763265 - 1.000000 * 0.369939 [cplayer] current audio pts 145.393326 [ao/pulse] delay = 0.157272 [cplayer] = 145.763265 - 1.000000 * 0.368950 [cplayer] current audio pts 145.394315 [ao/pulse] delay = 0.156274 [cplayer] = 145.763265 - 1.000000 * 0.367952 [cplayer] current audio pts 145.395313 The Since the latency calculation is wrong, Finally since I this bug has only started happening to me recently I suspect it's a regression in PulseAudio 16. |
@sfan5 can you reproduce it with pipewire-pulse? |
I could test this with PipeWire but I don't see how that's any useful. |
Because then it would allow us to fully determine if it's a PulseAudio bug. |
FYI, I just experienced this bug on Arch Linux with Pulseaudio 16.1, switching to Pipewire 0.3.58 seems to have fixed it. |
As far as I can tell PulseAudio introduced a bug in 16.0 where if a stream is (un)paused too often the reported latency will momentarily spike by 3000% or more. Apparently in certain cases just pausing once and waiting can also cause this. Save the remaining users of PA the trouble of debugging the various obscure issues that can arise from this (desync is a harmless example) by enabling the latency hack code again. ref: <mpv-player#12057> <mpv-player#10333>
As far as I can tell PulseAudio introduced a bug in 16.0 where if a stream is (un)paused too often the reported latency will momentarily spike by 3000% or more. Apparently in certain cases just pausing once and waiting can also cause this. Save the remaining users of PA the trouble of debugging the various obscure issues that can arise from this (desync is a harmless example) by enabling the latency hack code again. ref: <#12057> <#10333>
Important Information
Reproduction steps
mpv --no-config --force-window 06.flac
Expected behavior
5. mpv skips through song linearly
Actual behavior
5. mpv occasionally goes backwards (sometimes so often consecutively that you end up back the beginning)
Log file
http://sprunge.us/7995Gl
Sample files
https://0x0.st/oSbK.flac
Further information
Seeking going wrong is also evident in the log file:
After restarting playback at 196 the next seek should go to 196 + 5 = 201, yet mpv queues a seek to a position even before the starting point.
This also happens with
--hr-seek=no
(hr-seek is automatically enabled for audio).This does not happen with
--vid=no
or--no-audio-display
.This does not happen with
--ao=null
or--ao=alsa
The text was updated successfully, but these errors were encountered: