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
c53326af
Commit
c53326af
authored
May 20, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: move ost->frame_rate setting code before the filtergraph stuff
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
953df5d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
ffmpeg.c
ffmpeg.c
+9
-6
No files found.
ffmpeg.c
View file @
c53326af
...
...
@@ -3149,6 +3149,15 @@ static int transcode_init(void)
ist
->
decoding_needed
=
1
;
ost
->
encoding_needed
=
1
;
if
(
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
{
if
(
ist
&&
!
ost
->
frame_rate
.
num
)
ost
->
frame_rate
=
ist
->
st
->
r_frame_rate
.
num
?
ist
->
st
->
r_frame_rate
:
(
AVRational
){
25
,
1
};
if
(
ost
->
enc
&&
ost
->
enc
->
supported_framerates
&&
!
ost
->
force_fps
)
{
int
idx
=
av_find_nearest_q_idx
(
ost
->
frame_rate
,
ost
->
enc
->
supported_framerates
);
ost
->
frame_rate
=
ost
->
enc
->
supported_framerates
[
idx
];
}
}
if
(
!
ost
->
filter
&&
(
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
||
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
))
{
...
...
@@ -3169,12 +3178,6 @@ static int transcode_init(void)
codec
->
time_base
=
(
AVRational
){
1
,
codec
->
sample_rate
};
break
;
case
AVMEDIA_TYPE_VIDEO
:
if
(
ist
&&
!
ost
->
frame_rate
.
num
)
ost
->
frame_rate
=
ist
->
st
->
r_frame_rate
.
num
?
ist
->
st
->
r_frame_rate
:
(
AVRational
){
25
,
1
};
if
(
ost
->
enc
&&
ost
->
enc
->
supported_framerates
&&
!
ost
->
force_fps
)
{
int
idx
=
av_find_nearest_q_idx
(
ost
->
frame_rate
,
ost
->
enc
->
supported_framerates
);
ost
->
frame_rate
=
ost
->
enc
->
supported_framerates
[
idx
];
}
codec
->
time_base
=
(
AVRational
){
ost
->
frame_rate
.
den
,
ost
->
frame_rate
.
num
};
if
(
av_q2d
(
codec
->
time_base
)
<
0
.
001
&&
video_sync_method
!=
VSYNC_PASSTHROUGH
&&
(
video_sync_method
==
VSYNC_CFR
||
(
video_sync_method
==
VSYNC_AUTO
&&
!
(
oc
->
oformat
->
flags
&
AVFMT_VARIABLE_FPS
)))){
...
...
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