aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMashiat Sarker Shakkhar <shahriman_ams@yahoo.com>2011-11-30 01:55:21 +0600
committerMashiat Sarker Shakkhar <shahriman_ams@yahoo.com>2011-11-30 02:17:44 +0600
commitbe8a0d26dbeec72b8e254e00724f170c28644c98 (patch)
treee8ccbf7a1d4aba0d330205f77e663ed9215ff634
parent6dd19c97c4e24b0fb52e092702fb1192ea569525 (diff)
downloadffmpeg-be8a0d26dbeec72b8e254e00724f170c28644c98.tar.gz
Init s->cdlms[][].recent to order - 1
Not sure if this is correct. But looks like it was giving us off-by-one's when used to index buffers.
-rw-r--r--libavcodec/wmalosslessdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index d4b245a4c4..4be163e20d 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -776,7 +776,7 @@ static void reset_codec(WmallDecodeCtx *s)
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;
+ s->cdlms[ich][ilms].recent = s->cdlms[ich][ilms].order - 1;
/* first sample of a seekable subframe is considered as the starting of
a transient area which is samples_per_frame samples long */
s->channel[ich].transient_counter = s->samples_per_frame;