]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vaapi_h264.c
Merge commit '92e0b7342c0490894cbcea4461380321e0569de2'
[ffmpeg] / libavcodec / vaapi_h264.c
index 07478c16f036ca1ad45b3df2a956c0196da71c73..7e01e0196006b8c4721b91c0bb2a42acdda00eed 100644 (file)
@@ -329,7 +329,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
     if (!slice_param)
         return -1;
     slice_param->slice_data_bit_offset          = get_bits_count(&h->gb) + 8; /* bit buffer started beyond nal_unit_type */
-    slice_param->first_mb_in_slice              = (h->mb_y >> FIELD_OR_MBAFF_PICTURE(h)) * h->mb_width + h->mb_x;
+    slice_param->first_mb_in_slice              = (sl->mb_y >> FIELD_OR_MBAFF_PICTURE(h)) * h->mb_width + sl->mb_x;
     slice_param->slice_type                     = ff_h264_get_slice_type(sl);
     slice_param->direct_spatial_mv_pred_flag    = sl->slice_type == AV_PICTURE_TYPE_B ? sl->direct_spatial_mv_pred : 0;
     slice_param->num_ref_idx_l0_active_minus1   = sl->list_count > 0 ? sl->ref_count[0] - 1 : 0;