diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.c b/gst-libs/gst/codecparsers/gstmpegvideoparser.c index 365c2c3aba..255035a91e 100644 --- a/gst-libs/gst/codecparsers/gstmpegvideoparser.c +++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.c @@ -963,6 +963,9 @@ gst_mpeg_video_packet_parse_slice_header (const GstMpegVideoPacket * packet, if (height > 2800) READ_UINT8 (&br, vertical_position_extension, 3); + slice_hdr->vertical_position = packet->type; + slice_hdr->vertical_position_ext = vertical_position_extension; + if (seqscaleext) if (seqscaleext->scalable_mode == GST_MPEG_VIDEO_SEQ_SCALABLE_MODE_DATA_PARTITIONING) @@ -970,12 +973,12 @@ gst_mpeg_video_packet_parse_slice_header (const GstMpegVideoPacket * packet, READ_UINT8 (&br, slice_hdr->quantiser_scale_code, 5); - READ_UINT8 (&br, extra_bits, 1); - if (!extra_bits) + READ_UINT8 (&br, slice_hdr->slice_ext_flag, 1); + if (!slice_hdr->slice_ext_flag) slice_hdr->intra_slice = 0; else { READ_UINT8 (&br, slice_hdr->intra_slice, 1); - SKIP (&br, 1); + READ_UINT8 (&br, slice_hdr->slice_picture_id_enable, 1); READ_UINT8 (&br, slice_hdr->slice_picture_id, 6); READ_UINT8 (&br, bits, 1); diff --git a/gst-libs/gst/codecparsers/gstmpegvideoparser.h b/gst-libs/gst/codecparsers/gstmpegvideoparser.h index 404460e06b..2a33df0780 100644 --- a/gst-libs/gst/codecparsers/gstmpegvideoparser.h +++ b/gst-libs/gst/codecparsers/gstmpegvideoparser.h @@ -450,10 +450,13 @@ struct _GstMpegVideoGop /** * GstMpegVideoSliceHdr: - * @slice_vertical_position_extension: Extension to slice_vertical_position + * @vertical_position: slice vertical position + * @vertical_position_extension: Extension to slice_vertical_position * @priority_breakpoint: Point where the bitstream shall be partitioned * @quantiser_scale_code: Quantiser value (range: 1-31) + * @slice_ext_flag: Slice Extension flag * @intra_slice: Equal to one if all the macroblocks are intra macro blocks. + * @slice_picture_id_enable: controls the semantics of slice_picture_id * @slice_picture_id: Intended to aid recovery on severe bursts of * errors for certain types of applications * @@ -463,9 +466,14 @@ struct _GstMpegVideoGop */ struct _GstMpegVideoSliceHdr { + guint8 vertical_position; + guint8 vertical_position_ext; + guint8 priority_breakpoint; guint8 quantiser_scale_code; + guint8 slice_ext_flag; guint8 intra_slice; + guint8 slice_picture_id_enable; guint8 slice_picture_id; /* Calculated values */