Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
5f3ca90a
Commit
5f3ca90a
authored
Oct 02, 2017
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer: hevc: check id range in getter
parent
a3c984ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
modules/packetizer/hevc_nal.c
modules/packetizer/hevc_nal.c
+13
-1
No files found.
modules/packetizer/hevc_nal.c
View file @
5f3ca90a
...
...
@@ -522,10 +522,22 @@ bool hevc_get_xps_id(const uint8_t *p_buf, size_t i_buf, uint8_t *pi_id)
bs_t
bs
;
bs_init
(
&
bs
,
&
p_buf
[
2
],
i_buf
-
2
);
if
(
i_nal_type
==
HEVC_NAL_PPS
)
{
*
pi_id
=
bs_read_ue
(
&
bs
);
if
(
*
pi_id
>
HEVC_PPS_ID_MAX
)
return
false
;
}
else
{
*
pi_id
=
bs_read
(
&
bs
,
4
);
if
(
i_nal_type
==
HEVC_NAL_SPS
)
{
if
(
*
pi_id
>
HEVC_SPS_ID_MAX
)
return
false
;
}
else
if
(
*
pi_id
>
HEVC_VPS_ID_MAX
)
return
false
;
}
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment