From ae24b5ce3a955e4003c667e5ab3526ce80c71138 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Tue, 3 Jan 2012 13:38:01 +0100 Subject: [PATCH] vp3: fix streams with non-zero last coefficient Fixes a regression introduced in 8b94df0f2047e972. (cherry picked from commit 9b4767e4784577f3107730316fe652ccaccd9b3a) Signed-off-by: Reinhard Tartler (cherry picked from commit 82a11fcff24d9827070d77f1a3c6ba5d4dc12984) Signed-off-by: Reinhard Tartler --- libavcodec/vp3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 87cf03d24b..a4dd70d61f 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1316,6 +1316,8 @@ static inline int vp3_dequant(Vp3DecodeContext *s, Vp3Fragment *frag, return i; } } while (i < 64); + // return value is expected to be a valid level + i--; end: // the actual DC+prediction is in the fragment structure block[0] = frag->dc * s->qmat[0][inter][plane][0];