From 8c8d6e68780fdf040526c5c6c3d9e6cc975f1e9d Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 24 Mar 2015 15:38:51 +0100 Subject: [PATCH] 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. --- player/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/audio.c b/player/audio.c index b66952c53c..ba692e3955 100644 --- a/player/audio.c +++ b/player/audio.c @@ -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;