avcodec/vp3: Cleanup order of operations for current_run check
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 15 May 2015 08:42:22 +0000 (10:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 15 May 2015 09:12:13 +0000 (11:12 +0200)
This shouldnt make a difference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vp3.c

index 7cd04fb..005f043 100644 (file)
@@ -470,7 +470,7 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb)
             if (current_run == 34)
                 current_run += get_bits(gb, 12);
 
-            if (current_superblock + current_run > s->superblock_count) {
+            if (current_run > s->superblock_count - current_superblock) {
                 av_log(s->avctx, AV_LOG_ERROR,
                        "Invalid partially coded superblock run length\n");
                 return -1;