From patchwork Tue Mar 7 14:39:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Rapp X-Patchwork-Id: 2788 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp585329vsy; Tue, 7 Mar 2017 06:39:38 -0800 (PST) X-Received: by 10.28.210.133 with SMTP id j127mr1207074wmg.64.1488897578819; Tue, 07 Mar 2017 06:39:38 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 74si19155911wmq.55.2017.03.07.06.39.38; Tue, 07 Mar 2017 06:39:38 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5319B680AA3; Tue, 7 Mar 2017 16:39:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from p1002.netstorage.at (p1002.netstorage.at [89.207.146.186]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 58199680AA3 for ; Tue, 7 Mar 2017 16:39:07 +0200 (EET) Received: from mailix (noaport.de [46.237.252.213]) by p1002.netstorage.at (Postfix) with ESMTPA id 2693A816C2; Tue, 7 Mar 2017 15:39:20 +0100 (CET) Received: from frogstar-a.kuhnle.local (frogstar-a.kuhnle.local [192.168.0.26]) by mailix with ESMTPA ; Tue, 7 Mar 2017 15:39:19 +0100 From: Tobias Rapp To: ffmpeg-devel@ffmpeg.org Date: Tue, 7 Mar 2017 15:39:17 +0100 Message-Id: <1488897559-24574-2-git-send-email-t.rapp@noa-archive.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488897559-24574-1-git-send-email-t.rapp@noa-archive.com> References: <1488897559-24574-1-git-send-email-t.rapp@noa-archive.com> X-PPP-Message-ID: <20170307143920.8483.89056@p1002.netstorage.at> X-PPP-Vhost: noa-archive.com Subject: [FFmpeg-devel] [PATCH v3 1/3] ffmpeg: set the encoding framerate when the output is CFR X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Anton Khirnov MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Anton Khirnov (cherry picked from Libav commit d10102d23c9467d4eb84f58e0cd12be284b982f6) Signed-off-by: Tobias Rapp --- ffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffmpeg.c b/ffmpeg.c index 79c91ff..4117b64 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -3309,6 +3309,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 ||