diff options
author | wm4 <wm4@nowhere> | 2015-03-24 15:38:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-24 15:38:51 +0100 |
commit | 8c8d6e68780fdf040526c5c6c3d9e6cc975f1e9d (patch) | |
tree | 804031ee2e0c414c7209a46943e672fdd2c1256a /player/audio.c | |
parent | 603a0f733f5b343f52f1354483a9f9e1b53604c2 (diff) | |
download | mpv-8c8d6e68780fdf040526c5c6c3d9e6cc975f1e9d.tar.bz2 mpv-8c8d6e68780fdf040526c5c6c3d9e6cc975f1e9d.tar.xz |
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.
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |