avcodec/h261dec: Fix exported MVs for skipped MBs

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-01 18:48:23 +01:00
parent 0182e5a740
commit 61aca123fb
1 changed files with 7 additions and 0 deletions

View File

@ -216,6 +216,13 @@ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2)
s->mb_skipped = 1;
h->mtype &= ~MB_TYPE_H261_FIL;
if (s->current_picture.motion_val[0]) {
int b_stride = 2*s->mb_width + 1;
int b_xy = 2 * s->mb_x + (2 * s->mb_y) * b_stride;
s->current_picture.motion_val[0][b_xy][0] = s->mv[0][0][0];
s->current_picture.motion_val[0][b_xy][1] = s->mv[0][0][1];
}
ff_mpv_decode_mb(s, s->block);
}