h264: Fix parameters to ff_er_add_slice() call
authorJanne Grunau <janne-libav@jannau.net>
Thu, 15 Nov 2012 15:21:41 +0000 (16:21 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Fri, 16 Nov 2012 12:18:28 +0000 (13:18 +0100)
s->mb_x is reset to zero a couple of lines above. It does not make
sense to call ff_er_add_slice() with 0 as endx when the end of the
macroblock row was reached. Fixes unnecessary and counterproductive
error resilience in https://bugzilla.libav.org/show_bug.cgi?id=394.

CC: libav-stable@libav.org
libavcodec/h264.c

index 08957da..f45c572 100644 (file)
@@ -3567,7 +3567,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
                         return 0;
                     } else {
                         ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y,
-                                        s->mb_x, s->mb_y,
+                                        s->mb_x - 1, s->mb_y,
                                         ER_MB_END & part_mask);
 
                         return -1;