aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/MusicChunk.cxx3
-rw-r--r--src/decoder/DecoderAPI.cxx4
2 files changed, 1 insertions, 6 deletions
diff --git a/src/MusicChunk.cxx b/src/MusicChunk.cxx
index 0caeec46f..3cfd232c0 100644
--- a/src/MusicChunk.cxx
+++ b/src/MusicChunk.cxx
@@ -60,9 +60,6 @@ MusicChunk::Write(const AudioFormat af,
const size_t frame_size = af.GetFrameSize();
size_t num_frames = (sizeof(data) - length) / frame_size;
- if (num_frames == 0)
- return WritableBuffer<void>::Null();
-
return { data + length, num_frames * frame_size };
}
diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx
index 3d45cb325..4d0b2fd48 100644
--- a/src/decoder/DecoderAPI.cxx
+++ b/src/decoder/DecoderAPI.cxx
@@ -513,15 +513,13 @@ decoder_data(Decoder &decoder,
SongTime::FromS(decoder.timestamp) -
dc.song->GetStartTime(),
kbit_rate);
- if (dest.IsNull()) {
+ if (dest.IsEmpty()) {
/* the chunk is full, flush it */
decoder.FlushChunk();
continue;
}
size_t nbytes = dest.size;
- assert(nbytes > 0);
-
if (nbytes > length)
nbytes = length;