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
f6830cf5
Commit
f6830cf5
authored
Dec 16, 2015
by
Andreas Cadhalpun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nuv: sanitize negative fps rate
Signed-off-by:
Andreas Cadhalpun
<
Andreas.Cadhalpun@googlemail.com
>
parent
699e6837
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
nuv.c
libavformat/nuv.c
+9
-0
No files found.
libavformat/nuv.c
View file @
f6830cf5
...
...
@@ -172,6 +172,15 @@ static int nuv_header(AVFormatContext *s)
if
(
aspect
>
0
.
9999
&&
aspect
<
1
.
0001
)
aspect
=
4
.
0
/
3
.
0
;
fps
=
av_int2double
(
avio_rl64
(
pb
));
if
(
fps
<
0
.
0
f
)
{
if
(
s
->
error_recognition
&
AV_EF_EXPLODE
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid frame rate %f
\n
"
,
fps
);
return
AVERROR_INVALIDDATA
;
}
else
{
av_log
(
s
,
AV_LOG_WARNING
,
"Invalid frame rate %f, setting to 0.
\n
"
,
fps
);
fps
=
0
.
0
f
;
}
}
// number of packets per stream type, -1 means unknown, e.g. streaming
v_packs
=
avio_rl32
(
pb
);
...
...
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