]> git.sesse.net Git - ffmpeg/commitdiff
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 afb35037941c075c68de2bd87260d8c94b8dee73..80df418a2910c2601969fe5f3c6abafdc9480284 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");