aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-02 20:16:56 +0100
committerMax Kellermann <max@duempel.org>2008-11-02 20:16:56 +0100
commit79d70f124d1116cf5c3a39b64a63a9dd81c224c1 (patch)
treeb03421352820f13523e774517979624952826847 /src/output_control.c
parentcc164cc88402bef67b9c12f93fb223450834cc2d (diff)
downloadmpd-79d70f124d1116cf5c3a39b64a63a9dd81c224c1.tar.gz
mpd-79d70f124d1116cf5c3a39b64a63a9dd81c224c1.tar.xz
mpd-79d70f124d1116cf5c3a39b64a63a9dd81c224c1.zip
output: don't allow length==0
Nobody should call playAudio() with an empty chunk. Add some assertions on that.
Diffstat (limited to 'src/output_control.c')
-rw-r--r--src/output_control.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/output_control.c b/src/output_control.c
index f6ff6347a..10ad0df51 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -107,6 +107,8 @@ audio_output_signal(struct audio_output *ao)
void audio_output_play(struct audio_output *audioOutput,
const char *playChunk, size_t size)
{
+ assert(size > 0);
+
if (!audioOutput->open)
return;