summaryrefslogtreecommitdiff
path: root/decoders/decoder_mpg123.c
diff options
context:
space:
mode:
Diffstat (limited to 'decoders/decoder_mpg123.c')
-rw-r--r--decoders/decoder_mpg123.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/decoders/decoder_mpg123.c b/decoders/decoder_mpg123.c
index 41d25c1..9782f5b 100644
--- a/decoders/decoder_mpg123.c
+++ b/decoders/decoder_mpg123.c
@@ -75,6 +75,11 @@ static gssize mpg123_decoder_decode(struct decoder *decoder, GInputStream *input
return -1;
}
+ if(size == 0) {
+ *error = g_error_new(decoder_quark(), DECODER_CODE_DONE, "done");
+ return -1;
+ }
+
g_output_stream_write(output, outbuf, size, NULL, NULL);
return size;