diff options
author | Max Kellermann <max@duempel.org> | 2014-08-31 15:01:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-31 15:03:34 +0200 |
commit | 6e04d66a354c02910ebd849f2233e52de8b6e3c4 (patch) | |
tree | 99665a9e8c728828f24e18f5bc475f9ac86b892f /src/output/plugins/OssOutputPlugin.cxx | |
parent | 26bef5d20944d60b7bda1b1e6fc421e5d49e38b8 (diff) | |
parent | 86e8b3b4bd213f6013a0a2e8e0a9dd6d279494c1 (diff) | |
download | mpd-6e04d66a354c02910ebd849f2233e52de8b6e3c4.tar.gz mpd-6e04d66a354c02910ebd849f2233e52de8b6e3c4.tar.xz mpd-6e04d66a354c02910ebd849f2233e52de8b6e3c4.zip |
Merge tag 'v0.18.13'
Diffstat (limited to 'src/output/plugins/OssOutputPlugin.cxx')
-rw-r--r-- | src/output/plugins/OssOutputPlugin.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx index f2618491c..39d87fc35 100644 --- a/src/output/plugins/OssOutputPlugin.cxx +++ b/src/output/plugins/OssOutputPlugin.cxx @@ -724,6 +724,8 @@ oss_output_play(AudioOutput *ao, const void *chunk, size_t size, OssOutput *od = (OssOutput *)ao; ssize_t ret; + assert(size > 0); + /* reopen the device since it was closed by dropBufferedAudio */ if (od->fd < 0 && !oss_reopen(od, error)) return 0; @@ -734,6 +736,8 @@ oss_output_play(AudioOutput *ao, const void *chunk, size_t size, size = e.size; #endif + assert(size > 0); + while (true) { ret = write(od->fd, chunk, size); if (ret > 0) { |