mirror of
https://github.com/mpv-player/mpv
synced 2025-02-01 04:31:39 +00:00
audio: increase maximum amount of audio skipped for seeking
Precise seeking requires skipping audio, since the demuxer usually doesn't seek precisely enough. There is a sanity check that prevents skipping more than 300 seconds of audio. This still fails with very large mp3s. For example, with a 1GB sized mp3 with Xing headers, entries will be 4 MB apart on average, and occasionally much more. Just bump the limit. I'm not even sure why it was added in the first place; I suppose it's most important for files with real PTS resets.
This commit is contained in:
parent
603a0f733f
commit
8c8d6e6878
@ -431,7 +431,7 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip)
|
||||
|
||||
double ptsdiff = written_pts - sync_pts;
|
||||
// Missing timestamp, or PTS reset, or just broken.
|
||||
if (written_pts == MP_NOPTS_VALUE || fabs(ptsdiff) > 300) {
|
||||
if (written_pts == MP_NOPTS_VALUE || fabs(ptsdiff) > 3600) {
|
||||
MP_WARN(mpctx, "Failed audio resync.\n");
|
||||
mpctx->audio_status = STATUS_FILLING;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user