From e2c54d4d72d3a94fab55067056be8c55f6b6c3e5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 15 Aug 2012 22:09:56 +0200 Subject: [PATCH] mpegvideo_enc: reset mb_x/y before writing the headers Signed-off-by: Michael Niedermayer --- libavcodec/mpegvideo_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 5137dfa628..a8feeb6fb3 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -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: