return buf_size;
}
+static void mp_flush(MPADecodeContext *ctx)
+{
+ memset(ctx->synth_buf, 0, sizeof(ctx->synth_buf));
+ ctx->last_buf_size = 0;
+}
+
static void flush(AVCodecContext *avctx)
{
- MPADecodeContext *s = avctx->priv_data;
- memset(s->synth_buf, 0, sizeof(s->synth_buf));
- s->last_buf_size = 0;
+ mp_flush(avctx->priv_data);
}
#if CONFIG_MP3ADU_DECODER || CONFIG_MP3ADUFLOAT_DECODER
int i;
MP3On4DecodeContext *s = avctx->priv_data;
- for (i = 0; i < s->frames; i++) {
- MPADecodeContext *m = s->mp3decctx[i];
- memset(m->synth_buf, 0, sizeof(m->synth_buf));
- m->last_buf_size = 0;
- }
+ for (i = 0; i < s->frames; i++)
+ mp_flush(s->mp3decctx[i]);
}