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:
wm4 2015-03-24 15:38:51 +01:00
parent 603a0f733f
commit 8c8d6e6878
1 changed files with 1 additions and 1 deletions

View File

@ -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;