ffmpeg: set the encoding framerate when the output is CFR
authorAnton Khirnov <anton@khirnov.net>
Sat, 1 Oct 2016 09:47:23 +0000 (11:47 +0200)
committerTobias Rapp <t.rapp@noa-archive.com>
Fri, 17 Mar 2017 10:54:38 +0000 (11:54 +0100)
(cherry picked from Libav commit d10102d23c9467d4eb84f58e0cd12be284b982f6)

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
ffmpeg.c

index 63fc1bc..dbfb14b 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3314,6 +3314,8 @@ static int init_output_stream_encode(OutputStream *ost)
             enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample,
                                                  av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth);
 
+        enc_ctx->framerate = ost->frame_rate;
+
         ost->st->avg_frame_rate = ost->frame_rate;
 
         if (!dec_ctx ||