Improve flushing behaviour when there is a lot of space to fill (#2364).
authorCarl Hetherington <cth@carlh.net>
Mon, 14 Nov 2022 23:44:37 +0000 (00:44 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 15 Nov 2022 21:42:43 +0000 (22:42 +0100)
commitd42bc731c125170efb1bb7b8c9f990a3e9fa5b57
treec612e631ba68c07672b337e9769607a5f24eed38
parent5e09964bf1801b76970ed960122249e1d273abea
Improve flushing behaviour when there is a lot of space to fill (#2364).

Previously a call to flush() could result in a lot of audio being
emitted from the decoder (if there is a big gap between the end
of the audio and the video).  This would end up being emitted in
one chunk from the player, crashing the audio analyser with an OOM
in some cases.
src/lib/audio_decoder.cc
src/lib/audio_decoder.h
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_decoder.h