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
cf86fd00
Commit
cf86fd00
authored
May 26, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/matroskaenc: Avoid floats in default duration calculation
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8aa98530
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
matroskaenc.c
libavformat/matroskaenc.c
+3
-3
No files found.
libavformat/matroskaenc.c
View file @
cf86fd00
...
...
@@ -926,10 +926,10 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKTYPE
,
MATROSKA_TRACK_TYPE_VIDEO
);
if
(
st
->
avg_frame_rate
.
num
>
0
&&
st
->
avg_frame_rate
.
den
>
0
&&
1
.
0
/
av_q2d
(
st
->
avg_frame_rate
)
>
av_q2d
(
codec
->
time_base
)
)
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKDEFAULTDURATION
,
1
E9
/
av_q2d
(
st
->
avg_frame_rate
)
);
&&
av_cmp_q
(
av_inv_q
(
st
->
avg_frame_rate
),
codec
->
time_base
)
>
0
)
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKDEFAULTDURATION
,
1
000000000LL
*
st
->
avg_frame_rate
.
den
/
st
->
avg_frame_rate
.
num
);
else
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKDEFAULTDURATION
,
av_q2d
(
codec
->
time_base
)
*
1E9
);
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKDEFAULTDURATION
,
1000000000LL
*
codec
->
time_base
.
num
/
codec
->
time_base
.
den
);
if
(
!
native_id
&&
ff_codec_get_tag
(
ff_codec_movvideo_tags
,
codec
->
codec_id
)
&&
...
...
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