Browse Source

vaapi_h264: fix slice data offset

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Hendrik Leppkes Michael Niedermayer 10 years ago
parent
commit
aba3030a55
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/vaapi_h264.c

+ 1
- 1
libavcodec/vaapi_h264.c View File

@@ -328,7 +328,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
slice_param = (VASliceParameterBufferH264 *)ff_vaapi_alloc_slice(avctx->hwaccel_context, buffer, size);
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->slice_data_bit_offset = get_bits_count(&sl->gb) + 8; /* bit buffer started beyond nal_unit_type */
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;


Loading…
Cancel
Save