aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmalosslessdec.c
diff options
context:
space:
mode:
authorMashiat Sarker Shakkhar <shahriman_ams@yahoo.com>2011-11-06 03:00:49 +0600
committerMichael Niedermayer <michaelni@gmx.at>2011-11-11 03:26:35 +0100
commitf12f189638ecd24cc004f46cf80e0a4d2b88c85b (patch)
tree4afa9f6182c1ed0ca8e5ed6297a1ecc7b1a12b9d /libavcodec/wmalosslessdec.c
parent06b67051d5194f59a26a347fa3b4c61a59a4746a (diff)
downloadffmpeg-f12f189638ecd24cc004f46cf80e0a4d2b88c85b.tar.gz
Implement reset_codec()
(cherry picked from commit c56313aa7969691f1a779e5ac5666f012676836f) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 0ed4f059ed..a60f477089 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -746,6 +746,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