From 5d3c02a7bc690596c4cd3f69ed1664594060a46b Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 17 May 2007 18:19:37 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5201 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/formats/mod_shout/layer3.c | 4 ++-- src/mod/formats/mod_shout/mod_shout.c | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mod/formats/mod_shout/layer3.c b/src/mod/formats/mod_shout/layer3.c index 1e76ae38e5..490178df2c 100644 --- a/src/mod/formats/mod_shout/layer3.c +++ b/src/mod/formats/mod_shout/layer3.c @@ -836,11 +836,11 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in v = gr_info->pow2gain[sanity]; cb = *m++; } else { - return 0; + return 1; } } else { - return 0; + return 1; } } diff --git a/src/mod/formats/mod_shout/mod_shout.c b/src/mod/formats/mod_shout/mod_shout.c index 85271462ea..40bac015a1 100644 --- a/src/mod/formats/mod_shout/mod_shout.c +++ b/src/mod/formats/mod_shout/mod_shout.c @@ -271,7 +271,8 @@ static size_t decode_fd(shout_context_t * context, void *data, size_t bytes) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Decoder Error!\n"); } dlen = 0; - continue; + //continue; + goto error; } context->mp3err = 0; @@ -728,7 +729,11 @@ static switch_status_t shout_file_seek(switch_file_handle_t *handle, unsigned in } else if (context->fp) { *cur_sample = fseek(context->fp, *cur_sample, whence); } + + ExitMP3(&context->mp); + InitMP3(&context->mp, OUTSCALE, context->samplerate); switch_buffer_zero(context->audio_buffer); + } else { context->err++; }