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
ac97d47d
Commit
ac97d47d
authored
Apr 17, 2012
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv: use av_reduce instead of av_d2q for framerate estimation
It avoids some rounding errors.
parent
204bcdf5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
matroskadec.c
libavformat/matroskadec.c
+5
-3
No files found.
libavformat/matroskadec.c
View file @
ac97d47d
...
...
@@ -1550,9 +1550,11 @@ static int matroska_read_header(AVFormatContext *s)
255
);
if
(
st
->
codec
->
codec_id
!=
CODEC_ID_H264
)
st
->
need_parsing
=
AVSTREAM_PARSE_HEADERS
;
if
(
track
->
default_duration
)
st
->
r_frame_rate
=
st
->
avg_frame_rate
=
av_d2q
(
1000000000
.
0
/
track
->
default_duration
,
INT_MAX
);
if
(
track
->
default_duration
)
{
av_reduce
(
&
st
->
r_frame_rate
.
num
,
&
st
->
r_frame_rate
.
den
,
1000000000
,
track
->
default_duration
,
30000
);
st
->
avg_frame_rate
=
st
->
r_frame_rate
;
}
}
else
if
(
track
->
type
==
MATROSKA_TRACK_TYPE_AUDIO
)
{
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
st
->
codec
->
sample_rate
=
track
->
audio
.
out_samplerate
;
...
...
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