From: Carl Hetherington Date: Wed, 5 Apr 2017 22:30:20 +0000 (+0100) Subject: Fix off-by-one which could cause AudioDecoderStream::get not to X-Git-Tag: v2.10.3~1 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=40130527c0fd8010a94d2937c4c317eecd5b231e;hp=22df2cce3cb020c0a22e26d28879583dd04401bb;p=dcpomatic.git Fix off-by-one which could cause AudioDecoderStream::get not to fetch enough data to satisfy the request, causing dropouts in the written audio. --- diff --git a/ChangeLog b/ChangeLog index 377e089a2..40096c2f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-04-05 Carl Hetherington + + * Fix single-sample dropouts in audio in some circumstances. + 2016-12-11 Carl Hetherington * Version 2.10.2 released. diff --git a/src/lib/audio_decoder_stream.cc b/src/lib/audio_decoder_stream.cc index b7b96ddd4..82e087789 100644 --- a/src/lib/audio_decoder_stream.cc +++ b/src/lib/audio_decoder_stream.cc @@ -70,7 +70,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate) _log->log (String::compose ("-> ADS has request for %1 %2", frame, length), LogEntry::TYPE_DEBUG_DECODE); - Frame const end = frame + length - 1; + Frame const end = frame + length; /* If we are less than (about) 5 seconds behind the data that we want we'll run through it rather than seeking.