vp3: fix streams with non-zero last coefficient
authorJanne Grunau <janne-libav@jannau.net>
Tue, 3 Jan 2012 12:38:01 +0000 (13:38 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Thu, 5 Jan 2012 17:18:08 +0000 (18:18 +0100)
Fixes a regression introduced in 8b94df0f2047e972.

libavcodec/vp3.c

index f44d084..602b5fa 100644 (file)
@@ -1378,6 +1378,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];