1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00

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.
This commit is contained in:
Rudolf Polzer 2013-01-18 15:09:19 +01:00
parent 5bcd52178e
commit f7d96fe032

View File

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