[FFmpeg-cvslog] avcodec/vp3: Cleanup order of operations for current_run check

Michael Niedermayer git at videolan.org
Fri May 15 12:56:32 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May 15 10:42:22 2015 +0200| [dc4a621e9ceb81c4c019aa7656c2bfbec2df18d5] | committer: Michael Niedermayer

avcodec/vp3: Cleanup order of operations for current_run check

This shouldnt make a difference

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc4a621e9ceb81c4c019aa7656c2bfbec2df18d5
---

 libavcodec/vp3.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 7cd04fb..005f043 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -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;



More information about the ffmpeg-cvslog mailing list