From patchwork Sun Dec 8 11:47:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 16670 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 EB02C4463DC for ; Sun, 8 Dec 2019 13:48:07 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CDA8E68AEEC; Sun, 8 Dec 2019 13:48:07 +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 0DE3D68AEEC 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 xB8Bm1Fk031875 for ; Sun, 8 Dec 2019 12:48:01 +0100 Received: by phare.normalesup.org (Postfix, from userid 1001) id 0EB66E00EA; Sun, 8 Dec 2019 12:48:01 +0100 (CET) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 Dec 2019 12:47:58 +0100 Message-Id: <20191208114759.28289-1-george@nsup.org> X-Mailer: git-send-email 2.24.0 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 1/2] fftools/ffmpeg_opt: 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 --- fftools/ffmpeg_opt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 71063cc443..5ce70db23e 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -34,6 +34,7 @@ #include "libavutil/avstring.h" #include "libavutil/avutil.h" #include "libavutil/channel_layout.h" +#include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/fifo.h" #include "libavutil/mathematics.h" @@ -796,6 +797,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) if(!ist->dec) ist->dec = avcodec_find_decoder(par->codec_id); #if FF_API_LOWRES +FF_DISABLE_DEPRECATION_WARNINGS if (st->codec->lowres) { ist->dec_ctx->lowres = st->codec->lowres; ist->dec_ctx->width = st->codec->width; @@ -803,6 +805,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) ist->dec_ctx->coded_width = st->codec->coded_width; ist->dec_ctx->coded_height = st->codec->coded_height; } +FF_ENABLE_DEPRECATION_WARNINGS #endif // avformat_find_stream_info() doesn't set this for us anymore. @@ -2398,9 +2401,12 @@ loop_end: if ((ost->stream_copy || ost->attachment_filename) && (e = av_dict_get(o->g->codec_opts, "flags", NULL, AV_DICT_IGNORE_SUFFIX)) - && (!e->key[5] || check_stream_specifier(oc, ost->st, e->key+6))) + && (!e->key[5] || check_stream_specifier(oc, ost->st, e->key+6))) { +FF_DISABLE_DEPRECATION_WARNINGS if (av_opt_set(ost->st->codec, "flags", e->value, 0) < 0) exit_program(1); +FF_ENABLE_DEPRECATION_WARNINGS + } } #endif