summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_vc1.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2014-03-07 14:02:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-07 16:03:50 +0100
commit61ff0431ba8ed8f4b447e4257547da1b1bec6019 (patch)
tree8c564aa72a0fe2e439165b8a7e37d84dab6874a6 /libavcodec/dxva2_vc1.c
parent930f67b71294c37b89c661c6c67982df76a2785a (diff)
dxva2_vc1: include the start code in wMBbitOffset
This resolves a decoding failure on Intel GPUs. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dxva2_vc1.c')
-rw-r--r--libavcodec/dxva2_vc1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 88138e342e..51c847cb42 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -168,7 +168,7 @@ static void fill_slice(AVCodecContext *avctx, DXVA_SliceInfo *slice,
slice->dwSliceDataLocation = position;
slice->bStartCodeBitOffset = 0;
slice->bReservedBits = (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type) ? v->bfraction_lut_index + 9 : 0;
- slice->wMBbitOffset = v->p_frame_skipped ? 0xffff : get_bits_count(&s->gb);
+ slice->wMBbitOffset = v->p_frame_skipped ? 0xffff : get_bits_count(&s->gb) + (avctx->codec_id == AV_CODEC_ID_VC1 ? 32 : 0);
slice->wNumberMBsInSlice = s->mb_width * s->mb_height; /* XXX We assume 1 slice */
slice->wQuantizerScaleCode = v->pq;
slice->wBadSliceChopping = 0;