mpegvideo_enc: reset mb_x/y before writing the headers
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 20:09:56 +0000 (22:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 15 Aug 2012 20:09:56 +0000 (22:09 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegvideo_enc.c

index 5137dfa..a8feeb6 100644 (file)
@@ -3352,6 +3352,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
     if (s->current_picture.f.key_frame)
         s->picture_in_gop_number=0;
 
+    s->mb_x = s->mb_y = 0;
     s->last_bits= put_bits_count(&s->pb);
     switch(s->out_format) {
     case FMT_MJPEG: