avcodec/faxcompr: negate uncompressed runs
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 14 Aug 2015 11:37:36 +0000 (13:37 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 14 Aug 2015 11:54:05 +0000 (13:54 +0200)
Fixes remaining part of Ticket700

Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/faxcompr.c

index afb3503..80df418 100644 (file)
@@ -155,7 +155,7 @@ static int decode_uncompressed(AVCodecContext *avctx, GetBitContext *gb,
 
         for (k = 0; k < 2; k++) {
             if (codes[k]) {
-                if (*mode == k) {
+                if (*mode == !k) {
                     *(*runs)++ = saved_run;
                     if (*runs >= runend) {
                         av_log(avctx, AV_LOG_ERROR, "uncompressed run overrun\n");