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
80b6b314
Commit
80b6b314
authored
Nov 23, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov: compute avg_frame_rate only if duration is known
Fixes an assert in fuzzed sample sample.mp4_s265930.
parent
480be07a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mov.c
libavformat/mov.c
+3
-2
No files found.
libavformat/mov.c
View file @
80b6b314
...
@@ -2052,8 +2052,9 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
...
@@ -2052,8 +2052,9 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
((
double
)
st
->
codec
->
width
*
sc
->
height
),
INT_MAX
);
((
double
)
st
->
codec
->
width
*
sc
->
height
),
INT_MAX
);
}
}
av_reduce
(
&
st
->
avg_frame_rate
.
num
,
&
st
->
avg_frame_rate
.
den
,
if
(
st
->
duration
!=
AV_NOPTS_VALUE
)
sc
->
time_scale
*
st
->
nb_frames
,
st
->
duration
,
INT_MAX
);
av_reduce
(
&
st
->
avg_frame_rate
.
num
,
&
st
->
avg_frame_rate
.
den
,
sc
->
time_scale
*
st
->
nb_frames
,
st
->
duration
,
INT_MAX
);
#if FF_API_R_FRAME_RATE
#if FF_API_R_FRAME_RATE
if
(
sc
->
stts_count
==
1
||
(
sc
->
stts_count
==
2
&&
sc
->
stts_data
[
1
].
count
==
1
))
if
(
sc
->
stts_count
==
1
||
(
sc
->
stts_count
==
2
&&
sc
->
stts_data
[
1
].
count
==
1
))
...
...
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