summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-12-08 18:40:35 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-12-08 18:40:35 +0100
commite9ce21284b67029615d068c55456ca181646073f (patch)
treecf147f2b9ba46223d5364e836c8440a10abae158
parentaf96e1ce92c751f92cdb862985d1abe7362a6e59 (diff)
The mpg123 should error with DECODER_CODE_NONE when done.
-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;