From e9ce21284b67029615d068c55456ca181646073f Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 8 Dec 2010 18:40:35 +0100 Subject: The mpg123 should error with DECODER_CODE_NONE when done. --- decoders/decoder_mpg123.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'decoders') 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; -- cgit v1.2.3