From patchwork Wed Mar 20 02:07:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47244 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8ba5:b0:1a3:31a3:7958 with SMTP id m37csp119472pzh; Tue, 19 Mar 2024 19:08:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW/skj3+pNLCTNfY8QWkGjWtuBSmsoLoH4iJF9TTG7LHb6204mVNwW8e5YMDLLQxO2JEZFQgEzLsV+IciDei6zLlZGEOkrupIYf1g== X-Google-Smtp-Source: AGHT+IHkLo+4/Pcp9/H81UXSqxphR6L+85h5lfw4Ysxzkzju/gGsqTE2og5KdvS/7cVEnpbZ9D0h X-Received: by 2002:a2e:b8cb:0:b0:2d4:aa55:72db with SMTP id s11-20020a2eb8cb000000b002d4aa5572dbmr8033768ljp.19.1710900501849; Tue, 19 Mar 2024 19:08:21 -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 w8-20020a170906480800b00a46c507c122si2131177ejq.445.2024.03.19.19.08.21; Tue, 19 Mar 2024 19:08:21 -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; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=UbVVPzFR; arc=fail (body hash mismatch); 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C524968D278; Wed, 20 Mar 2024 04:08:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01olkn2040.outbound.protection.outlook.com [40.92.66.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 73F1A68D278 for ; Wed, 20 Mar 2024 04:08:11 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eJ7x/tcMj0Wuq2q9yqXLiOieFVS921KG2jixxdB2oa50u+lnyd0RUO5bKq+WVQYd1KchaGLjHPZCfIqZa2lt9zw4oyzA0Ealz3rBhquUXg9yZWaPGrc7BvrQ6XSiYku2QykxFIhbqMMYlT7QUbuLQuBInP6vzlmyO9KJncOUiYXEH7miqtn4n7HCx8dKtchvlghUQBTJqqwlYltlKNsZIVtH+H+h4WCXS89zlnO1vE69Z8Peb61CXc+fu9tjkN0rxQI6rxVrOImhQkGei8Qc1cL7D9vKF6ya2G/f5IqQyxNFKlPgJp2JeYT8nDU057wYcNTeMKD0ZcEvFMES+ualTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tUm8j9DQrlppE5kaOsAjS+WvehbqoZE8cgZKt2Qjmd8=; b=b9yjtG4X7DgiSnx0K7GPnJE0LykfXokuOPYNx7VvqXd9cxCCW1qcEvoLzBLccnTujQdkEgDiivZb+7Fyfqmh357iFQZUF2rEHkj6xzssB7xJz8FoWetcdsCEPnhO4CdqhNRhcc25aERrBh14g14cXvSTZpKAitfdH28CUDcmZrg6XRSFz2AXMDTUZwHNxMZljAy5F38Spgz0jUIhCyTbeIxobD9E7acZU14HrrIAh/zNsDPyolAlgVoLgcM2BNbcG8k2feS6nYavs0abv8bcpM7jF3hQelQd7UtHSuMEC433diVue85lyPmW9VGb3gKUmZB+XPfeH49VuzTy7N+5xg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tUm8j9DQrlppE5kaOsAjS+WvehbqoZE8cgZKt2Qjmd8=; b=UbVVPzFRe+L7lhkyCPJMEGFeTrnV4c5QrZTmGJfQsgep4Nx3qlsBCBOkiNu5j4nO0HDMo+LRYoRB9qwUF+qsPkm7f/m3v0Cb23Z5IiFTudDDKEArl243AOjFLu5och+zBqZTaZnL3oGPVDBJTkt0ntw98ASQ5vGMxjJfvSjQ53EOGkNnbjRkUtJlUiEwk+3f+qVSlx2OLXCANImS+55BW+JnPuzUn+yl3UkGtcWERaCniifSuhkRH4yTU2arsXqX/1v0W/lwBrnkafmw8jdn5Yn0tUlbUEs+Tn1Ezc3lxpzHbRjPek1NVT2IWFFcQICNHWbmLmBKOFhz5jCwHA0LKA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DB9P250MB0404.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:326::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Wed, 20 Mar 2024 02:08:10 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::228d:8c6f:ed10:82eb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::228d:8c6f:ed10:82eb%7]) with mapi id 15.20.7362.035; Wed, 20 Mar 2024 02:08:09 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Mar 2024 03:07:50 +0100 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [OY5jljeNCnLRO8GlgLwQ3PelIrw0leiuQ/9/fJ21E8E=] X-ClientProxiedBy: ZR2P278CA0064.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240320020802.107280-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DB9P250MB0404:EE_ X-MS-Office365-Filtering-Correlation-Id: 999053ac-b416-411b-18b4-08dc48829714 X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnpHlru1h1vRfamsRCbuNA5UOvhy76plfq7JfhgL33pAgdWR2e+iwvgMT8B+y/woFDW+rH5LuFTKisIzEDlmGQIZDx+TTbRESPX9n0KrwrNZWB6BQHWx2epstHnyv51RGgS4Wj0rd7M+VYC/jNH2bTQ1VUGs0Mkqy41V4RccilBtYMGP75iwi200JuNyYRydebIQ1KuodXyqN1KuTc+eWYyTphqFqGqh6WVFAaFxHKUaF71warc5sgkVtlEz44F/qdTpARXgeBr3HkJDGNOWiw6OsfaWzb8FsDjbwY5dDBKFdkvstrbWs9kYTexAuWrPHS26VaqtwTrzFWBNla77QNdjCCFQq/AA9vgHd38AGqStiGlxgF5sRO4B0OiaHK6TwfhnnqcZ8iViO1faqbzrsPS0Kyxc0AYZpjfbf8xE4uanrR2/1XzqP27l0qsk0VoN3/CAxk/EC8ItScC9yMZn+bWy1THxVYB/Q/T8k789xkxLymzW7/EGJxJQ+VBqsVdUIevdhR+YuFPHXL8CFSHGozH2bpD14hs2pTkYozFx4xOiOiaOuIjhNkLhJ4EOhS28CQPvCPlKG7U0w7vc52thxdyVE41TM92ZbEpqQlb1hor/po64ktLovvbRaAaB3ne08UxIMwdj0Rk2MKy0cqPfd1TfEltIdjYhyYMdHaBABhrzh1DmN3TFhztRupBnzXhVuEXd1mfa8keWgbqs/ENhI1abCy7QVOGHeMC9GcEeNaNBCYBVP4WOZChSyfD71MMtDqg= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v+BjsrrEZ/aif2zx91iM8MS8GYL0K0svj4uz191GhUAFOC0p3ssTAodk2gGZ3efElkLOl0GWCoTnLK9U7SgTy9TAQzgSFCmg+SFjwwP9F11MsOn/fh87ytCkGGyWEYuFh5M4590/d/DmtD2xvBV3dPizxo/2HeppxhLeDjdA5J8PSexWIRVF2ogwj8724g455T9O8uM8FZNSTp2hpMNOKAABY9hGh5OHM+yW5NxCnuy9Mt+TRGj13F8flc1T8vTYifp2MJs3NBNSIMhh+fE72AAvF1PrgOpXaFghOXqVScdxOgRmkSsI7cwXOHWaC+WAbHThbV9G34hR9IvQc7N/BLcH3GfevTLGVDWcJLCwPVnHw32ujgFtEKoGtGbOGDRZqqtg5gduLpzhw21/eyDUFXZc8zlDLwMRJCPmvrln/rMZNipux/mgg8H6uZhvGGK6DTaFz/BVr+VKhSYGS4J9dfxSq1yxtr5XoajR5rzCihYmfwcrPu/Xu+ireDSi50uVkH446Iwx2lY+HEuuaIxpW+xEWuaGe5VV/uNE4M194568sFYD2SM/V/XGSr6SbDYXoPZBTRCuqMGu0WdO8hbbR757ufyvDboWU6WLZbmKwnfAzV/F3ui2eO/NKQh0JdIg X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ++dEWYfF6/GfMTTHYHvDTCIHb6gm85bR+Kzh6bWBwhfwzkBmwuqkeCaG6w532B+ipvp+XgJDWf2id6wrhRJnRkDygdAXf1O+G/YAO6aSQdk6DANFpS4Ha5wPWSMq5DFpQ5DSPdOJf2I74xfGxqJTFCTnhY4+01bk5FfNQyjaf3TJKWvNp4+CalrVSG/XxzRoXDz4Ns4HavI0TX/QLiCT67pZ5ag8aNxeVGueWJXweVEPdU8HEQ3ApHxSngimegPpXundvl8s/+OcJigA5tUlgCCzyxF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c48829714 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2024 02:08:09.9572 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P250MB0404 Subject: [FFmpeg-devel] [PATCH 01/13] avformat/mp3enc: Improve query_codec 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: hxeLarnNd8X/ Signal that anything except MP3 and the ID3V2 attached pic types are forbidden. Signed-off-by: Andreas Rheinhardt --- libavformat/mp3enc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index cb250a46ca..4a02a45069 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -495,12 +495,16 @@ static int mp3_write_trailer(struct AVFormatContext *s) static int query_codec(enum AVCodecID id, int std_compliance) { const CodecMime *cm= ff_id3v2_mime_tags; + + if (id == AV_CODEC_ID_MP3) + return 1; + while(cm->id != AV_CODEC_ID_NONE) { if(id == cm->id) return MKTAG('A', 'P', 'I', 'C'); cm++; } - return -1; + return 0; } static const AVOption options[] = {