From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D08184A763 for ; Fri, 5 Apr 2024 18:58:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A54868D1C8; Fri, 5 Apr 2024 21:57:40 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 90F1468D1B0 for ; Fri, 5 Apr 2024 21:57:31 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1712343447; bh=3/VAVPZZSeAp2OfHaHXLchGI9H0VELGXWZz8M97gZM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ln/D2HMqg3pYvSzcvt9NVWMwv7p3A1nj09ajPVsDueoGhscLWsb/AiEoOsJVDRrAl hezsIe9dcSwP3RJ2SK79A9zqIKElZqBdWQQUKnHB/6WksiBPyfJx6kUbg0mPHKVMzK NG4z4AWPqSATYpeajxA/z3/yvkyjBNb3CWjuz6CE= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 9E38143961; Fri, 5 Apr 2024 20:57:27 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Fri, 5 Apr 2024 20:57:19 +0200 Message-ID: <20240405185721.111072-9-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240405185721.111072-1-ffmpeg@haasn.xyz> References: <20240405185721.111072-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/11] fftools: drop unused/hacky macros X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas Having macros initialize local variables seems strange to me, and there are no more current users of these macros. (The one that was commented out was incorrect anyway, since the macro has changed in the meantime) --- fftools/cmdutils.h | 13 ------------- fftools/ffmpeg_filter.c | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index d0c773663ba..940541b9eaf 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -465,19 +465,6 @@ void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems); #define GROW_ARRAY(array, nb_elems)\ grow_array((void**)&array, sizeof(*array), &nb_elems, nb_elems + 1) -#define GET_PIX_FMT_NAME(pix_fmt)\ - const char *name = av_get_pix_fmt_name(pix_fmt); - -#define GET_CODEC_NAME(id)\ - const char *name = avcodec_descriptor_get(id)->name; - -#define GET_SAMPLE_FMT_NAME(sample_fmt)\ - const char *name = av_get_sample_fmt_name(sample_fmt) - -#define GET_SAMPLE_RATE_NAME(rate)\ - char name[16];\ - snprintf(name, sizeof(name), "%d", rate); - double get_rotation(const int32_t *displaymatrix); /* read file contents into a string */ diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 2308abf82af..ac04841a16c 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -401,7 +401,7 @@ static void choose_ ## name (OutputFilterPriv *ofp, AVBPrint *bprint) \ } //DEF_CHOOSE_FORMAT(pix_fmts, enum AVPixelFormat, format, formats, AV_PIX_FMT_NONE, -// GET_PIX_FMT_NAME) +// av_get_pix_fmt_name) DEF_CHOOSE_FORMAT(sample_fmts, enum AVSampleFormat, format, formats, AV_SAMPLE_FMT_NONE, "%s", av_get_sample_fmt_name) -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".