diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-12-16 23:00:12 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-12-16 23:00:12 +0000 |
| commit | 1444299fa4582fc65c5237edd6c115921f20f872 (patch) | |
| tree | 16e0b17e4a7546e44751c22fc972c6d019a38356 /src/lib/dcp_decoder.cc | |
| parent | 55de736793120aaba39b46896c4b0c74950119b7 (diff) | |
Flush audio decoder when a DCPDecoder finishes so thatv2.14.18
resamplers are emptied and hence we don't lose any
samples. Fixes #1691.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 340ef5d93..7bd7ddf68 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -106,7 +106,14 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent bool DCPDecoder::pass () { - if (_reel == _reels.end () || !_dcp_content->can_be_played ()) { + if (!_dcp_content->can_be_played()) { + return true; + } + + if (_reel == _reels.end()) { + if (audio) { + audio->flush (); + } return true; } |
