mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg: use the frame rate computed by lavfi.
This frame rate is more reliable than the one copied from the input stream, so it is used in priority.
This commit is contained in:
parent
5f281e94ba
commit
8362d734a3
2
ffmpeg.c
2
ffmpeg.c
@ -2915,6 +2915,8 @@ static int transcode_init(void)
|
||||
ost->encoding_needed = 1;
|
||||
|
||||
if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
if (ost->filter && !ost->frame_rate.num)
|
||||
ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter);
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user