From 03684c8ff33c8afd7edc0ffbf2f3b01101bb0e1d Mon Sep 17 00:00:00 2001 From: Mashiat Sarker Shakkhar Date: Sun, 6 Nov 2011 03:00:49 +0600 Subject: [PATCH] Implement reset_codec() --- libavcodec/wmalosslessdec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 422fd6c979..5c6eed1744 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -743,6 +743,17 @@ static void clear_codec_buffers(WmallDecodeCtx *s) } } +static void reset_codec(WmallDecodeCtx *s) +{ + int ich, ilms; + s->mclms_recent = s->mclms_order * s->num_channels; + for (ich = 0; ich < s->num_channels; ich++) + for (ilms = 0; ilms < s->cdlms_ttl[ich]; ilms++) + s->cdlms[ich][ilms].recent = s->cdlms[ich][ilms].order; +} + + + /** *@brief Decode a single subframe (block). *@param s codec context