summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-04-05 23:30:20 +0100
committerCarl Hetherington <cth@carlh.net>2017-04-05 23:30:20 +0100
commit40130527c0fd8010a94d2937c4c317eecd5b231e (patch)
tree96da3c10c65e74bcc57628a8ab126244684e133e
parent22df2cce3cb020c0a22e26d28879583dd04401bb (diff)
Fix off-by-one which could cause AudioDecoderStream::get not to
fetch enough data to satisfy the request, causing dropouts in the written audio.
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/audio_decoder_stream.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 377e089a2..40096c2f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-04-05 Carl Hetherington <cth@carlh.net>
+
+ * Fix single-sample dropouts in audio in some circumstances.
+
2016-12-11 Carl Hetherington <cth@carlh.net>
* 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.