mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
h264parser: fix MAX_SPS/PPS boundary checks
This commit is contained in:
parent
e922dee30b
commit
6c4f5b6ae9
1 changed files with 4 additions and 4 deletions
|
@ -953,7 +953,7 @@ gst_h264_parser_parse_buffering_period (GstH264NalParser * nalparser,
|
||||||
|
|
||||||
GST_DEBUG ("parsing \"Buffering period\"");
|
GST_DEBUG ("parsing \"Buffering period\"");
|
||||||
|
|
||||||
READ_UE_ALLOWED (nr, sps_id, 0, GST_H264_MAX_SPS_COUNT);
|
READ_UE_ALLOWED (nr, sps_id, 0, GST_H264_MAX_SPS_COUNT - 1);
|
||||||
sps = gst_h264_parser_get_sps (nalparser, sps_id);
|
sps = gst_h264_parser_get_sps (nalparser, sps_id);
|
||||||
if (!sps) {
|
if (!sps) {
|
||||||
GST_WARNING ("couldn't find associated sequence parameter set with id: %d",
|
GST_WARNING ("couldn't find associated sequence parameter set with id: %d",
|
||||||
|
@ -1372,7 +1372,7 @@ gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps,
|
||||||
|
|
||||||
READ_UINT8 (&nr, sps->level_idc, 8);
|
READ_UINT8 (&nr, sps->level_idc, 8);
|
||||||
|
|
||||||
READ_UE_ALLOWED (&nr, sps->id, 0, GST_H264_MAX_SPS_COUNT);
|
READ_UE_ALLOWED (&nr, sps->id, 0, GST_H264_MAX_SPS_COUNT - 1);
|
||||||
|
|
||||||
if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
|
if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
|
||||||
sps->profile_idc == 122 || sps->profile_idc == 244 ||
|
sps->profile_idc == 122 || sps->profile_idc == 244 ||
|
||||||
|
@ -1523,8 +1523,8 @@ gst_h264_parse_pps (GstH264NalParser * nalparser, GstH264NalUnit * nalu,
|
||||||
|
|
||||||
nal_reader_init (&nr, nalu->data + nalu->offset + 1, nalu->size - 1);
|
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, pps->id, 0, GST_H264_MAX_PPS_COUNT - 1);
|
||||||
READ_UE_ALLOWED (&nr, sps_id, 0, GST_H264_MAX_SPS_COUNT);
|
READ_UE_ALLOWED (&nr, sps_id, 0, GST_H264_MAX_SPS_COUNT - 1);
|
||||||
|
|
||||||
sps = gst_h264_parser_get_sps (nalparser, sps_id);
|
sps = gst_h264_parser_get_sps (nalparser, sps_id);
|
||||||
if (!sps) {
|
if (!sps) {
|
||||||
|
|
Loading…
Reference in a new issue