diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2013-01-18 15:09:19 +0100 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2013-01-18 15:09:19 +0100 |
commit | f7d96fe03286d07e874d1c6acdd942b57a900a7e (patch) | |
tree | f36b0f25483ad044ec2491d8341add898defc8db /core | |
parent | 5bcd52178e7690e73b7d89c20b1ad41c76e528b4 (diff) | |
download | mpv-f7d96fe03286d07e874d1c6acdd942b57a900a7e.tar.bz2 mpv-f7d96fe03286d07e874d1c6acdd942b57a900a7e.tar.xz |
core: make gapless-audio also apply to format changes within a file
Format changes within a file can e.g. happen in MPEG-TS streams. This
fix also fixes encoding of such files, because ao_lavc is not capable of
reconfiguring the audio stream.
Diffstat (limited to 'core')
-rw-r--r-- | core/mplayer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/mplayer.c b/core/mplayer.c index 8cbf7db002..0356e876b4 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -2287,7 +2287,8 @@ static int fill_audio_out_buffers(struct MPContext *mpctx, double endpts) * implementation would require draining buffered old-format audio * while displaying video, then doing the output format switch. */ - uninit_player(mpctx, INITIALIZED_AO); + if (!mpctx->opts.gapless_audio) + uninit_player(mpctx, INITIALIZED_AO); reinit_audio_chain(mpctx); return -1; } else if (res == ASYNC_PLAY_DONE) |