Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
be3c7a5f
Commit
be3c7a5f
authored
Mar 31, 2008
by
Rafaël Carré
Committed by
Jean-Paul Saman
Mar 31, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264 packetizer : do not trust the input data in p_extra
parent
cf34ca7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
modules/packetizer/h264.c
modules/packetizer/h264.c
+20
-8
No files found.
modules/packetizer/h264.c
View file @
be3c7a5f
...
@@ -223,25 +223,37 @@ static int Open( vlc_object_t *p_this )
...
@@ -223,25 +223,37 @@ static int Open( vlc_object_t *p_this )
i_sps
=
(
*
p
++
)
&
0x1f
;
i_sps
=
(
*
p
++
)
&
0x1f
;
for
(
i
=
0
;
i
<
i_sps
;
i
++
)
for
(
i
=
0
;
i
<
i_sps
;
i
++
)
{
{
int
i_length
=
GetWBE
(
p
);
uint16_t
i_length
=
GetWBE
(
p
);
p
+=
2
;
block_t
*
p_sps
=
nal_get_annexeb
(
p_dec
,
p
+
2
,
i_length
);
if
(
i_length
>
(
uint8_t
*
)
p_dec
->
fmt_in
.
p_extra
+
p_dec
->
fmt_in
.
i_extra
-
p
)
{
return
VLC_EGENERIC
;
}
block_t
*
p_sps
=
nal_get_annexeb
(
p_dec
,
p
,
i_length
);
if
(
!
p_sps
)
return
VLC_EGENERIC
;
p_sys
->
p_sps
=
block_Duplicate
(
p_sps
);
p_sys
->
p_sps
=
block_Duplicate
(
p_sps
);
p_sps
->
i_pts
=
p_sps
->
i_dts
=
mdate
();
p_sps
->
i_pts
=
p_sps
->
i_dts
=
mdate
();
ParseNALBlock
(
p_dec
,
p_sps
);
ParseNALBlock
(
p_dec
,
p_sps
);
p
+=
2
+
i_length
;
p
+=
i_length
;
}
}
/* Read PPS */
/* Read PPS */
i_pps
=
*
p
++
;
i_pps
=
*
p
++
;
for
(
i
=
0
;
i
<
i_pps
;
i
++
)
for
(
i
=
0
;
i
<
i_pps
;
i
++
)
{
{
int
i_length
=
GetWBE
(
p
);
uint16_t
i_length
=
GetWBE
(
p
);
p
+=
2
;
block_t
*
p_pps
=
nal_get_annexeb
(
p_dec
,
p
+
2
,
i_length
);
if
(
i_length
>
(
uint8_t
*
)
p_dec
->
fmt_in
.
p_extra
+
p_dec
->
fmt_in
.
i_extra
-
p
)
{
return
VLC_EGENERIC
;
}
block_t
*
p_pps
=
nal_get_annexeb
(
p_dec
,
p
,
i_length
);
if
(
!
p_pps
)
return
VLC_EGENERIC
;
p_sys
->
p_pps
=
block_Duplicate
(
p_pps
);
p_sys
->
p_pps
=
block_Duplicate
(
p_pps
);
p_pps
->
i_pts
=
p_pps
->
i_dts
=
mdate
();
p_pps
->
i_pts
=
p_pps
->
i_dts
=
mdate
();
ParseNALBlock
(
p_dec
,
p_pps
);
ParseNALBlock
(
p_dec
,
p_pps
);
p
+=
2
+
i_length
;
p
+=
i_length
;
}
}
msg_Dbg
(
p_dec
,
"avcC length size=%d, sps=%d, pps=%d"
,
msg_Dbg
(
p_dec
,
"avcC length size=%d, sps=%d, pps=%d"
,
p_sys
->
i_avcC_length_size
,
i_sps
,
i_pps
);
p_sys
->
i_avcC_length_size
,
i_sps
,
i_pps
);
...
...
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