diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-05-08 18:37:30 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-05-08 18:48:19 +0300 |
commit | 64fd62d68abeb3a7325695061c9cb21e13c02d08 (patch) | |
tree | 040a213858510a5de3f8a81dfcefe1bf8be23404 /libavcodec/dxva2_h264.c | |
parent | 617cd45ddc9b0fed4e3b4bcb8a51b37fc8565ee8 (diff) |
avcodec/dxva2_h264: fix slice offset in long slice struct after ca2f19b9
The GetBitContext now includes the NAL header, which offsets the slice by
one byte, which needs to be accounted for here.
Diffstat (limited to 'libavcodec/dxva2_h264.c')
-rw-r--r-- | libavcodec/dxva2_h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 7048c4aada..bcba875b7c 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -228,7 +228,7 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, slice->first_mb_in_slice = (sl->mb_y >> FIELD_OR_MBAFF_PICTURE(h)) * h->mb_width + sl->mb_x; slice->NumMbsForSlice = 0; /* XXX it is set once we have all slices */ - slice->BitOffsetToSliceData = get_bits_count(&sl->gb); + slice->BitOffsetToSliceData = get_bits_count(&sl->gb) - 8; slice->slice_type = ff_h264_get_slice_type(sl); if (sl->slice_type_fixed) slice->slice_type += 5; |