Commit e2c54d4d authored by Michael Niedermayer's avatar Michael Niedermayer

mpegvideo_enc: reset mb_x/y before writing the headers

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 717a1876
...@@ -3352,6 +3352,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) ...@@ -3352,6 +3352,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
if (s->current_picture.f.key_frame) if (s->current_picture.f.key_frame)
s->picture_in_gop_number=0; s->picture_in_gop_number=0;
s->mb_x = s->mb_y = 0;
s->last_bits= put_bits_count(&s->pb); s->last_bits= put_bits_count(&s->pb);
switch(s->out_format) { switch(s->out_format) {
case FMT_MJPEG: case FMT_MJPEG:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment