Fix sound corruption with multiple sound files (#2368).
authorCarl Hetherington <cth@carlh.net>
Sat, 19 Nov 2022 16:16:38 +0000 (17:16 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 25 Nov 2022 22:42:55 +0000 (23:42 +0100)
commit7d0cd227fa8cf13b04504af22301521dc231c0c7
tree452317c14a2227aa80c67b8d06bb70b3a675b5bb
parentc80cca033afbb73ae790dd94d506acbfb9fa7a57
Fix sound corruption with multiple sound files (#2368).

last_push_end would be initialised to the position of the content,
meaning that content at (for example) 60s into the project would
be treated as the leader, and content much earlier would then be
considered finished by the code which checks ignore_streams_behind
(as its last push was more then 5s before the leader).

This caused audio corruption, shown up by the test here.
src/lib/player.cc
src/lib/player.h
test/player_test.cc