aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-31 08:26:03 +0200
committerMax Kellermann <max@duempel.org>2014-08-31 08:26:03 +0200
commitcd6e0ff88aba5c671568cbc45138acb2c0d0d121 (patch)
tree7509b240fef3a26010a7668d1dc340047b21e2c5 /src/decoder
parent2ca979425f882183b67adc143a3a4062104b4c5a (diff)
downloadmpd-cd6e0ff88aba5c671568cbc45138acb2c0d0d121.tar.gz
mpd-cd6e0ff88aba5c671568cbc45138acb2c0d0d121.tar.xz
mpd-cd6e0ff88aba5c671568cbc45138acb2c0d0d121.zip
MusicChunk: remove special case for num_frames==0
Simply return an empty WritableBuffer, not a nulled one.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/DecoderAPI.cxx4
1 files changed, 1 insertions, 3 deletions
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;