Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
427
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
401d61d3
Commit
401d61d3
authored
5 months ago
by
François Cartegnie
Browse files
Options
Downloads
Patches
Plain Diff
demux: adaptive: skip PNG junk when probing
refs
#28757
parent
a4aea586
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5934
demux: adaptive: skip PNG junk when probing
Pipeline
#508275
passed with stage
in 18 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/demux/adaptive/StreamFormat.cpp
+18
-0
18 additions, 0 deletions
modules/demux/adaptive/StreamFormat.cpp
with
18 additions
and
0 deletions
modules/demux/adaptive/StreamFormat.cpp
+
18
−
0
View file @
401d61d3
...
...
@@ -128,6 +128,24 @@ StreamFormat::StreamFormat(const void *data_, size_t sz)
type
=
Type
::
Unknown
;
const
char
moov
[]
=
"ftypmoovmoofemsg"
;
/* Skip PNG junk */
if
(
sz
>=
20
&&
!
memcmp
(
data
,
"
\x89
PNG
\x0D\x0A\x1A\x0A
"
,
8
))
{
data
+=
8
;
sz
-=
8
;
while
(
sz
>=
12
)
{
uint32_t
chunk
=
GetDWBE
(
data
);
vlc_fourcc_t
cktype
=
VLC_FOURCC
(
data
[
4
],
data
[
5
],
data
[
6
],
data
[
7
]);
if
(
chunk
>
sz
-
12
)
break
;
sz
-=
chunk
+
12
;
data
+=
chunk
+
12
;
if
(
cktype
==
VLC_FOURCC
(
'I'
,
'E'
,
'N'
,
'D'
))
break
;
}
}
/* Skipped ID3 if any */
while
(
sz
>
10
&&
ID3TAG_IsTag
(
data
,
false
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment