diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-08-24 17:42:46 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-08-26 07:50:06 +0200 |
commit | 44b0b85fe97b7197b8af80a6251ace6e732083c6 (patch) | |
tree | c599f4e9d9cb00fdb4a5c2f3395e12d1004da271 | |
parent | db70730291df74595873d41914d2ef398fb13364 (diff) | |
download | ffmpeg-44b0b85fe97b7197b8af80a6251ace6e732083c6.tar.gz |
avconv: prefer user-forced input framerate when choosing output framerate
-rw-r--r-- | avconv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1682,7 +1682,11 @@ static int transcode_init(void) (video_sync_method == VSYNC_CFR || (video_sync_method == VSYNC_AUTO && !(oc->oformat->flags & (AVFMT_NOTIMESTAMPS | AVFMT_VARIABLE_FPS))))) { - ost->frame_rate = ist->st->avg_frame_rate.num ? ist->st->avg_frame_rate : (AVRational){25, 1}; + ost->frame_rate = ist->framerate.num ? ist->framerate : + ist->st->avg_frame_rate.num ? + ist->st->avg_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]; |