From patchwork Thu Feb 18 03:42:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25742 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 A2000449CDB for ; Thu, 18 Feb 2021 05:45:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BF51868A56C; Thu, 18 Feb 2021 05:43:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CCE2A689CA7 for ; Thu, 18 Feb 2021 05:42:57 +0200 (EET) Received: by mail-wr1-f48.google.com with SMTP id n4so1183248wrx.1 for ; Wed, 17 Feb 2021 19:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=/I8ofOxT4mx3KYl/WN9DCqm56gjiIOkASJAMbGkaicY=; b=AlaAIczKPF/K83gXLjj7AUvpzRUERML1K0QmYKLss30eZPUd/mRdH4f+74G7tFu3T0 InysdlgJzHbWOQ2t0LYlY+nqqDeKbFlwAOIai9s5U/HU7CXWJiPzhgcJ1O4xegnCiob3 mconp/DYK0EEyBRnOuc5Sbggn9j1iVXXm9l33AAgo90LVsipPpqWgdMl9Gqj9x41FFgm 1D6azNIeXhkLZXC/ZgWSRENbXv7XT6jjzOKsBZuKUo8+GuGIGrTFubk1bYm4NH4ud7iS ww6bjUItJSOp+kEuOoyi34lcC0+SSyJ07sBZSq3CvGBxyj6qIwzz/GRKL91VDVFoFwmO 8V1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=/I8ofOxT4mx3KYl/WN9DCqm56gjiIOkASJAMbGkaicY=; b=scYWkyzATxySYEiFYfeqrbOHCbPwD0D7CziK13B1a6m2eO2QTqA9HOhiJM29hG0p33 CLwZwZ+o+VhMcCamCRqx3p72EN+I4HyXsks38QHpzHUCKjrRyHM2truNY8kuqOnkGil4 2aGhUU8UvN0yWdq6bcltDFMwwwNlFL9nC0rLxn6y1EyZyFphZwjjRI2jT1B4h90VNCWJ qOyeASq10NU3hvwPQy2Ro2C19a1W8LBkGK5/ACFr6AzzErZRrYnVLh1JKj2RUDIyzSdO q+IPjPc/aLOpfUIDd5IxxTiOuNjqGlj1wsRZ+QuI/78MGNXaXXTr1aX2lr5eZWD32WqR VC+A== X-Gm-Message-State: AOAM53089Ngy78XX0QA0j816ahTlpEJC0MpTRIOoz4PcWBEdn8UOave0 gZpSpT71UZHCdpsqd59BW9tCGZQedUE= X-Google-Smtp-Source: ABdhPJzH6w5UVR/tqegL6gtv6SEzLv953SUYXWz4QJNG3YxGyFXgBFIVm5lkLrdQLbQeX1Sg6oSWpQ== X-Received: by 2002:adf:b641:: with SMTP id i1mr2136878wre.295.1613619777101; Wed, 17 Feb 2021 19:42:57 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id p9sm5643855wmc.1.2021.02.17.19.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 19:42:56 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Feb 2021 04:42:03 +0100 Message-Id: <20210218034214.2090223-18-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210218034214.2090223-1-andreas.rheinhardt@gmail.com> References: <20210218034214.2090223-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 18/29] avformat/asfenc: Deduplicate codec tags lists 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Also saves relocations. Signed-off-by: Andreas Rheinhardt --- libavformat/asfenc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index 8b24264c94..23a09efe05 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -258,6 +258,10 @@ static const AVCodecTag codec_asf_bmp_tags[] = { { AV_CODEC_ID_NONE, 0 }, }; +static const AVCodecTag *const asf_codec_tags[] = { + codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, NULL +}; + #define PREROLL_TIME 3100 static void put_str16(AVIOContext *s, const char *tag) @@ -1170,9 +1174,7 @@ AVOutputFormat ff_asf_muxer = { .write_packet = asf_write_packet, .write_trailer = asf_write_trailer, .flags = AVFMT_GLOBALHEADER, - .codec_tag = (const AVCodecTag * const []) { - codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, 0 - }, + .codec_tag = asf_codec_tags, .priv_class = &asf_muxer_class, }; #endif /* CONFIG_ASF_MUXER */ @@ -1197,9 +1199,7 @@ AVOutputFormat ff_asf_stream_muxer = { .write_packet = asf_write_packet, .write_trailer = asf_write_trailer, .flags = AVFMT_GLOBALHEADER, - .codec_tag = (const AVCodecTag * const []) { - codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, 0 - }, + .codec_tag = asf_codec_tags, .priv_class = &asf_stream_muxer_class, }; #endif /* CONFIG_ASF_STREAM_MUXER */