]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix the fix
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 29 Sep 2008 16:59:06 +0000 (16:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 29 Sep 2008 16:59:06 +0000 (16:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9739 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/formats/mod_shout/mod_shout.c

index ec3fdb2e3c1edca303aea1c350b214a0f242228f..02426c7f7dccbd5ebb203d0c2399c8eab0651525 100644 (file)
@@ -271,7 +271,6 @@ static size_t decode_fd(shout_context_t *context, void *data, size_t bytes)
                                decode_status = mpg123_decode(context->mh, in, inlen, out, outlen, &dlen);
                        }
 
-
                        if (context->err) {
                                goto error;
                        }
@@ -287,7 +286,7 @@ static size_t decode_fd(shout_context_t *context, void *data, size_t bytes)
                        } else if (decode_status == MPG123_OK) {
                                usedlen = dlen;
                                break;
-                       } else if (decode_status == MPG123_DONE) {
+                       } else if (decode_status == MPG123_DONE || (context->eof && decode_status == MPG123_NEED_MORE)) {
                                context->eof++;
                                goto end;
                        } else if (decode_status == MPG123_ERR || decode_status > 0) {