Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
32215b21
Commit
32215b21
authored
Apr 19, 2019
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/vc1dec: Reduce probe score for streams with invalid frames.
Fixes ticket #7853.
parent
53064e13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
vc1dec.c
libavformat/vc1dec.c
+9
-4
No files found.
libavformat/vc1dec.c
View file @
32215b21
...
...
@@ -26,7 +26,7 @@
static
int
vc1_probe
(
const
AVProbeData
*
p
)
{
int
seq
=
0
,
entry
=
0
,
frame
=
0
,
i
;
int
seq
=
0
,
entry
=
0
,
invalid
=
0
,
frame
=
0
,
i
;
for
(
i
=
0
;
i
<
p
->
buf_size
+
5
;
i
++
)
{
uint32_t
code
=
AV_RB32
(
p
->
buf
+
i
);
...
...
@@ -39,16 +39,19 @@ static int vc1_probe(const AVProbeData *p)
profile
=
(
p
->
buf
[
i
]
&
0xc0
)
>>
6
;
if
(
profile
!=
PROFILE_ADVANCED
)
{
seq
=
0
;
invalid
++
;
continue
;
}
level
=
(
p
->
buf
[
i
]
&
0x38
)
>>
3
;
if
(
level
>=
5
)
{
seq
=
0
;
invalid
++
;
continue
;
}
chromaformat
=
(
p
->
buf
[
i
]
&
0x6
)
>>
1
;
if
(
chromaformat
!=
1
)
{
seq
=
0
;
invalid
++
;
continue
;
}
seq
++
;
...
...
@@ -56,8 +59,10 @@ static int vc1_probe(const AVProbeData *p)
break
;
}
case
VC1_CODE_ENTRYPOINT
:
if
(
!
seq
)
if
(
!
seq
)
{
invalid
++
;
continue
;
}
entry
++
;
i
+=
2
;
break
;
...
...
@@ -71,9 +76,9 @@ static int vc1_probe(const AVProbeData *p)
}
}
if
(
frame
>
1
)
if
(
frame
>
1
&&
frame
>>
1
>
invalid
)
return
AVPROBE_SCORE_EXTENSION
/
2
+
1
;
if
(
frame
=
=
1
)
if
(
frame
>
=
1
)
return
AVPROBE_SCORE_EXTENSION
/
4
;
return
0
;
}
...
...
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