Fix incorrectly-timed emission of silence padding causing buffer fill (#2217).
authorCarl Hetherington <cth@carlh.net>
Mon, 14 Mar 2022 19:29:44 +0000 (20:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 15 Mar 2022 08:20:17 +0000 (09:20 +0100)
commit0c846af54055b9915c6c68617cd28176d5f84351
tree72a7c31582f3919a4e18c91ccaa412c0d91a6056
parent6acf4527c0b2919f5774d9dbff2ad5c0fa98075a
Fix incorrectly-timed emission of silence padding causing buffer fill (#2217).

On initialisation or after seek we insert silence corresponding to
a positive delay in an audio stream.  Previously this inserted silence
was done at time 0, so that after a seek to time T the silent frames
would come out of the audio merger at time 0 and then the player would
fill the space up to time T with silence.  If T was far enough along
this would fill the audio buffers without there being any video.
src/lib/audio_decoder.cc
src/lib/audio_decoder.h
test/butler_test.cc