diff options
author | wm4 <wm4@nowhere> | 2015-01-28 19:36:46 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-28 19:40:12 +0100 |
commit | 7f7340ce7627135a5f858ae538fd9a9f140b1ed1 (patch) | |
tree | 1be9f184c10304afb89e43ba73956f97fd249834 /player | |
parent | 8d15f7583ca000bc06568c79175835a7eed3cd3d (diff) | |
download | mpv-7f7340ce7627135a5f858ae538fd9a9f140b1ed1.tar.bz2 mpv-7f7340ce7627135a5f858ae538fd9a9f140b1ed1.tar.xz |
player: enable hr-seek on audio after video end
Some files can have audio after video has ended, and playback of the
audio-only remainder is supposed to work just fine.
Seeking is broken-ish though. Not much can be done about this, since
it's the way demuxers work. Also, such files are obscure corner cases.
But enabling hr-seek for audio after video end can improve the situation
a lot.
This helps with issue #1533. The reported also provided a command line
to produce such a file:
ffmpeg -i image.jpg -i audio.flac -threads $(nproc) \
-c:v libvpx -crf 10 -qmin 5 -qmax 55 \
-vf scale=360:-1 -sws_flags lanczos -c:a libvorbis -ac 2 \
-b:a 128K out.webm
Diffstat (limited to 'player')
-rw-r--r-- | player/audio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c index c49f2ea523..d6fb348f58 100644 --- a/player/audio.c +++ b/player/audio.c @@ -401,7 +401,8 @@ static bool get_sync_samples(struct MPContext *mpctx, int *skip) if (written_pts == MP_NOPTS_VALUE && !mp_audio_buffer_samples(mpctx->ao_buffer)) return false; // no audio read yet - bool sync_to_video = mpctx->d_video && mpctx->sync_audio_to_video; + bool sync_to_video = mpctx->d_video && mpctx->sync_audio_to_video && + mpctx->video_status != STATUS_EOF; double sync_pts = MP_NOPTS_VALUE; if (sync_to_video) { |