From cd6e0ff88aba5c671568cbc45138acb2c0d0d121 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 31 Aug 2014 08:26:03 +0200 Subject: MusicChunk: remove special case for num_frames==0 Simply return an empty WritableBuffer, not a nulled one. --- src/MusicChunk.cxx | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/MusicChunk.cxx') 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::Null(); - return { data + length, num_frames * frame_size }; } -- cgit v1.2.3