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
5f758c31
Commit
5f758c31
authored
Oct 01, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/matroskaenc: use r_frame_rate as fallback to set a track's DefaultDuration
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
66d45af1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
matroskaenc.c
libavformat/matroskaenc.c
+3
-0
No files found.
libavformat/matroskaenc.c
View file @
5f758c31
...
...
@@ -1311,6 +1311,9 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
if
(
st
->
avg_frame_rate
.
num
>
0
&&
st
->
avg_frame_rate
.
den
>
0
&&
av_cmp_q
(
av_inv_q
(
st
->
avg_frame_rate
),
st
->
time_base
)
>
0
)
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKDEFAULTDURATION
,
1000000000LL
*
st
->
avg_frame_rate
.
den
/
st
->
avg_frame_rate
.
num
);
else
if
(
st
->
r_frame_rate
.
num
>
0
&&
st
->
r_frame_rate
.
den
>
0
&&
av_cmp_q
(
av_inv_q
(
st
->
r_frame_rate
),
st
->
time_base
)
>
0
)
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKDEFAULTDURATION
,
1000000000LL
*
st
->
r_frame_rate
.
den
/
st
->
r_frame_rate
.
num
);
if
(
!
native_id
&&
ff_codec_get_tag
(
ff_codec_movvideo_tags
,
par
->
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