dxva2_h264: fix slice offset in long slice structs
authorHendrik Leppkes <h.leppkes@gmail.com>
Mon, 23 Mar 2015 13:16:44 +0000 (14:16 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 23 Mar 2015 20:53:29 +0000 (20:53 +0000)
libavcodec/dxva2_h264.c

index 03af474..093db99 100644 (file)
@@ -222,7 +222,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(&h->gb);
+    slice->BitOffsetToSliceData  = get_bits_count(&sl->gb);
     slice->slice_type            = ff_h264_get_slice_type(sl);
     if (sl->slice_type_fixed)
         slice->slice_type += 5;