avcodec/rpza: fix +- error
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 17 Aug 2014 12:30:32 +0000 (14:30 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 17 Aug 2014 12:39:43 +0000 (14:39 +0200)
Fixes Ticket3471

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

index 9509d30..23e2a75 100644 (file)
@@ -94,11 +94,11 @@ static void rpza_decode_stream(RpzaContext *s)
     chunk_size = bytestream2_get_be32(&s->gb) & 0x00FFFFFF;
 
     /* If length mismatch use size from MOV file and try to decode anyway */
-    if (chunk_size != bytestream2_get_bytes_left(&s->gb) - 4)
+    if (chunk_size != bytestream2_get_bytes_left(&s->gb) + 4)
         av_log(s->avctx, AV_LOG_WARNING,
                "MOV chunk size %d != encoded chunk size %d\n",
                chunk_size,
-               bytestream2_get_bytes_left(&s->gb) - 4
+               bytestream2_get_bytes_left(&s->gb) + 4
               );
 
     /* Number of 4x4 blocks in frame. */