Skip to content

Commit af6a5e7

Browse files
committed
fixed #2366
1 parent 78b76fa commit af6a5e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/media_tools/av_parsers.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -5677,10 +5677,10 @@ static s32 avc_parse_slice(GF_BitStream *bs, AVCState *avc, Bool svc_idr_flag, A
56775677
if (si->slice_type > 9) return -1;
56785678

56795679
pps_id = gf_bs_read_ue_log(bs, "pps_id");
5680-
if ((pps_id<0) || (pps_id > 255)) return -1;
5680+
if ((pps_id<0) || (pps_id >= 255)) return -1;
56815681
si->pps = &avc->pps[pps_id];
56825682
if (!si->pps->slice_group_count) return -2;
5683-
if (si->pps->sps_id>=255) return -1;
5683+
if (si->pps->sps_id>=32) return -1;
56845684
si->sps = &avc->sps[si->pps->sps_id];
56855685
if (!si->sps->log2_max_frame_num) return -2;
56865686
avc->sps_active_idx = si->pps->sps_id;
@@ -5787,7 +5787,7 @@ static s32 svc_parse_slice(GF_BitStream *bs, AVCState *avc, AVCSliceInfo *si)
57875787
if (si->slice_type > 9) return -1;
57885788

57895789
pps_id = gf_bs_read_ue_log(bs, "pps_id");
5790-
if ((pps_id<0) || (pps_id > 255))
5790+
if ((pps_id<0) || (pps_id >= 255))
57915791
return -1;
57925792
si->pps = &avc->pps[pps_id];
57935793
si->pps->id = pps_id;

0 commit comments

Comments
 (0)