From patchwork Mon Oct 10 00:36:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 934 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp2187705vsd; Sun, 9 Oct 2016 17:37:16 -0700 (PDT) X-Received: by 10.194.72.168 with SMTP id e8mr26420439wjv.104.1476059836386; Sun, 09 Oct 2016 17:37:16 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j10si35039755wjn.115.2016.10.09.17.37.11; Sun, 09 Oct 2016 17:37:16 -0700 (PDT) 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 A4BA76898B3; Mon, 10 Oct 2016 03:36:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-2.mx.upcmail.net (vie01a-dmta-pe04-2.mx.upcmail.net [62.179.121.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 823CC6897BF for ; Mon, 10 Oct 2016 03:36:45 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1btOaT-0005OP-8g for ffmpeg-devel@ffmpeg.org; Mon, 10 Oct 2016 02:37:01 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id tcd01t0020S5wYM01cd1vS; Mon, 10 Oct 2016 02:37:01 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 10 Oct 2016 02:36:37 +0200 Message-Id: <20161010003637.8919-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.10.1 Subject: [FFmpeg-devel] [PATCH] avformat/isom: Fix old API regression with exporting max bitrate 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavformat/isom.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libavformat/isom.c b/libavformat/isom.c index cb457dd..ab79e22 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -488,9 +488,14 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext avio_rb24(pb); /* buffer size db */ v = avio_rb32(pb); - // TODO: fix this - //if (v < INT32_MAX) - // st->codecpar->rc_max_rate = v; + + // TODO: fix this with codecpar +#if FF_API_LAVF_AVCTX +FF_DISABLE_DEPRECATION_WARNINGS + if (v < INT32_MAX) + st->codec->rc_max_rate = v; +FF_ENABLE_DEPRECATION_WARNINGS +#endif st->codecpar->bit_rate = avio_rb32(pb); /* avg bitrate */