diff options
author | Max Kellermann <max@duempel.org> | 2014-08-31 08:26:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-31 08:26:03 +0200 |
commit | cd6e0ff88aba5c671568cbc45138acb2c0d0d121 (patch) | |
tree | 7509b240fef3a26010a7668d1dc340047b21e2c5 /src/MusicChunk.cxx | |
parent | 2ca979425f882183b67adc143a3a4062104b4c5a (diff) |
MusicChunk: remove special case for num_frames==0
Simply return an empty WritableBuffer, not a nulled one.
Diffstat (limited to 'src/MusicChunk.cxx')
-rw-r--r-- | src/MusicChunk.cxx | 3 |
1 files changed, 0 insertions, 3 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 }; } |