summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2011-08-29 13:52:16 +0200
committerThibault Saunier <thibault.saunier@collabora.com>2011-08-31 09:31:08 -0300
commit29fe165c30bc5411ba5966a0cc9d3b0d5879d36e (patch)
tree2ffdc97e11bf0b556dadd046ed7586a3062598ec
parenta8238558c7aff5ec2db5980662e9d40a38cb9355 (diff)
codecparsers: h264: fix NAL reader initialization.
-rw-r--r--gst-libs/gst/codecparsers/gsth264parser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c
index a4c09c0ac..964d93716 100644
--- a/gst-libs/gst/codecparsers/gsth264parser.c
+++ b/gst-libs/gst/codecparsers/gsth264parser.c
@@ -1289,7 +1289,7 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
GstH264VUIParams *vui = NULL;
GST_DEBUG ("parsing SPS");
- nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size);
+ nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
/* set default values for fields that might not be present in the bitstream
and have valid defaults */
@@ -1462,7 +1462,7 @@ gst_h264_parse_pps (GstH264NalParser * nalparser, GstH264NalUnit * nalu,
GST_DEBUG ("parsing PPS");
- nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size);
+ nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
READ_UE_ALLOWED (&nr, pps->id, 0, GST_H264_MAX_PPS_COUNT);
READ_UE_ALLOWED (&nr, sps_id, 0, GST_H264_MAX_SPS_COUNT);
@@ -1627,7 +1627,7 @@ gst_h264_parser_parse_slice_hdr (GstH264NalParser * nalparser,
}
- nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size);
+ nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
READ_UE (&nr, slice->first_mb_in_slice);
READ_UE (&nr, slice->type);
@@ -1799,7 +1799,7 @@ gst_h264_parser_parse_sei (GstH264NalParser * nalparser, GstH264NalUnit * nalu,
GST_DEBUG ("parsing \"Sei message\"");
- nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size);
+ nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
sei->payloadType = 0;
do {