From patchwork Sun Dec 8 11:47:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 16671 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id E1F504463DC for ; Sun, 8 Dec 2019 13:48:08 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C2BD268B062; Sun, 8 Dec 2019 13:48:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C91C68AFD8 for ; Sun, 8 Dec 2019 13:48:02 +0200 (EET) X-ENS-nef-client: 129.199.129.80 Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id xB8Bm1nW031877 for ; Sun, 8 Dec 2019 12:48:01 +0100 Received: by phare.normalesup.org (Postfix, from userid 1001) id 5B24CE0196; Sun, 8 Dec 2019 12:48:01 +0100 (CET) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 Dec 2019 12:47:59 +0100 Message-Id: <20191208114759.28289-2-george@nsup.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191208114759.28289-1-george@nsup.org> References: <20191208114759.28289-1-george@nsup.org> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Sun, 08 Dec 2019 12:48:01 +0100 (CET) Subject: [FFmpeg-devel] [PATCH 2/2] lavf/dump: hide a few deprecation warnings. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Nicolas George --- libavformat/dump.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavformat/dump.c b/libavformat/dump.c index 56814ff7d2..fcf8bad63a 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -479,12 +479,14 @@ static void dump_stream_format(AVFormatContext *ic, int i, } // Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext +FF_DISABLE_DEPRECATION_WARNINGS avctx->properties = st->codec->properties; avctx->codec = st->codec->codec; avctx->qmin = st->codec->qmin; avctx->qmax = st->codec->qmax; avctx->coded_width = st->codec->coded_width; avctx->coded_height = st->codec->coded_height; +FF_ENABLE_DEPRECATION_WARNINGS if (separator) av_opt_set(avctx, "dump_separator", separator, 0); @@ -519,7 +521,9 @@ static void dump_stream_format(AVFormatContext *ic, int i, int fps = st->avg_frame_rate.den && st->avg_frame_rate.num; int tbr = st->r_frame_rate.den && st->r_frame_rate.num; int tbn = st->time_base.den && st->time_base.num; +FF_DISABLE_DEPRECATION_WARNINGS int tbc = st->codec->time_base.den && st->codec->time_base.num; +FF_ENABLE_DEPRECATION_WARNINGS if (fps || tbr || tbn || tbc) av_log(NULL, AV_LOG_INFO, "%s", separator); @@ -530,8 +534,10 @@ static void dump_stream_format(AVFormatContext *ic, int i, print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr"); if (tbn) print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn"); +FF_DISABLE_DEPRECATION_WARNINGS if (tbc) print_fps(1 / av_q2d(st->codec->time_base), "tbc"); +FF_ENABLE_DEPRECATION_WARNINGS } if (st->disposition & AV_DISPOSITION_DEFAULT)