aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/AudiofileDecoderPlugin.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/decoder/AudiofileDecoderPlugin.cxx b/src/decoder/AudiofileDecoderPlugin.cxx
index 7c76deb7d..3fb23bc20 100644
--- a/src/decoder/AudiofileDecoderPlugin.cxx
+++ b/src/decoder/AudiofileDecoderPlugin.cxx
@@ -43,7 +43,12 @@ struct AudioFileInputStream {
InputStream &is;
size_t Read(void *buffer, size_t size) {
- return decoder_read(decoder, is, buffer, size);
+ /* libaudiofile does not like partial reads at all,
+ and wil abort playback; therefore always force full
+ reads */
+ return decoder_read_full(decoder, is, buffer, size)
+ ? size
+ : 0;
}
};