From patchwork Wed Mar 20 02:12:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47250 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8ba5:b0:1a3:31a3:7958 with SMTP id m37csp121036pzh; Tue, 19 Mar 2024 19:13:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUYcewY4EQbt2sXJI5lLEHUoaVA0Bgxm+sdZTqhT74ehl0ZSK7WJbikR2D4C+EHjmNMjYXJGj6UUut5Gjf5ez7+grkli8vRwU9Tgg== X-Google-Smtp-Source: AGHT+IFJaNW178bHLf70X/hC9q0l4dDbso2w0S++CmCvKHA0TZysrVC0kB+JwPln9d8tk15RihH8 X-Received: by 2002:a05:6402:548e:b0:568:1444:a828 with SMTP id fg14-20020a056402548e00b005681444a828mr11048179edb.37.1710900834376; Tue, 19 Mar 2024 19:13:54 -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 a6-20020a05640213c600b00568939b9f82si5972198edx.104.2024.03.19.19.13.54; Tue, 19 Mar 2024 19:13:54 -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=BuSGLclQ; 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 5EAC368D476; Wed, 20 Mar 2024 04:13:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2061.outbound.protection.outlook.com [40.92.90.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F256668D46C for ; Wed, 20 Mar 2024 04:13:42 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ec4VCtX8weCRO5aAl3/aImLvxnlS7ktRfUWFAUykp0HjKGM0GQr9kpL77xV6Oxr55dUIgDRFlH3No+qoP09csvzag5vfVYNwwpWS6SWpPQkMOgGfDuw+yTWBnpGTk7SrlCTpQrIvwx945+3J7bnymsL+P8pdgE2sXt07jkf3QexojC7u712ifya8G8rurll1Fnxzf3uEPPOHjCWQndqOoY0aEuDQcJFMm1Y9VlpnvvESg6cfq6d+nUk1t+dQtSpv0NnHe8gRdicGKlh7wbYrNzehCf2POGJQP/87pznaNdYpfkgU83Cj9tRI9HkA/PiC+xO1XrE7x/6PeamEiAjQlg== 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=rLikuu1+5d9dfrgDN6BI4M2iFw1SA6DAGuSpvzBq35E=; b=oUR0q2pZUWX8xGCKM9TynHz3YqeN44vwR+V0MU6Su7ysCiAhln9lIbvVGrl1rF2RWL3DLJ85o1jexh//AAa9k2S3YZXj+SSnWUjlGWLiu+DV6ySAaYiB5Z986+pKbeBMSxSGBTTiE6bpzuQyhfNtSIrDhBJnGBE64gm2bfIsMnhSCgqiQTcOjnziuj6B8E72pLGklw8QaeuCohHtaoMZVZfMNtVdx4AJfhm3QdpxpNyOYtGQ+gx1m46e5r2nRE7UJArPcrPodpLIYB3CXGQOlHvJI1ob8rFbKBmQu0+qWH9cCNQbfRmtu2xUZbu8pVVdzHbC7TFE9RXe69zHYeTGlQ== 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=rLikuu1+5d9dfrgDN6BI4M2iFw1SA6DAGuSpvzBq35E=; b=BuSGLclQCNxrD14ZCPysQ87t2WHGhlO95ZSx87CE5CkLvwfUDdXiOiBwN2eKD/zEu9Pww6HpUDIhDzozXCWYJm5FEOppS/TfOZJvZQTcrLNDO0rlCSX2KhyX3aclDXJPqvngbt2UxbDrMYiIbZZmus2ZLsqTvS/DhLNUWhNFD0aNegnPawUMHb0lqCxtnQpoFU3+m/R8PlWJ/vNv6R1rmF8m80ahmwifW+vdRJTUDtixJ31g+W5DhHV+VwvDZEt27aMd7Ono/LoqcAUVdEOO02ZURAtVamTr1iva+cccdzvj+OhO42FVlZSFKL9XlpTEvRbL+/d5YC4sAYY00BIFHg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PAXP250MB0543.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:28c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Wed, 20 Mar 2024 02:13:41 +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:13:41 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Mar 2024 03:12:49 +0100 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [PWK4sE42Z5ynuN1+JhoFHqEyix3o1P/tWqBv5IY82/8=] X-ClientProxiedBy: ZR0P278CA0062.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::13) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240320021256.107338-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PAXP250MB0543:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e6e2e9a-f700-4e70-4240-08dc48835cc3 X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnpHlru1h1vRfamsRCbuNA5UIMp5WVnghOYuPcQmDEty3+AvPss47Rzk7BZ1ePbAD0OTasIkl2A0KxD1c3s4MaU+NgRmHvLJRTMwdd0k7UjL6sWM/hV6uM+C3SE4mE6gk4PD95A4jiSAYQDxn4gPm4yeLGoCIrnCPnnhHOfvMgEwOu81r9S6OygkZidvgytfw+jsDfimw3SmvjJvh6v+LSkXbbgBX/d9/zwJ4RXOdWe4dHCYYZyEYaGEavvVmfsH14RDaZKXXV+kHb7fhMJm0pU8A/1bBKDOTOz513VKTzvEnUjOKIcfrkXLIghESkh3ex36F/JXyzKmQpzDkzqbppxHskX6Tf0aCrZjkaUAK/rGlno2D8x1aEBB7VcumBM8ogKsS945SBpADDZNL0UgnS+1wHSA5Jewi9ZFzXjC7JTqgE9VOkXnNwCxaqqkYB6U3m457zCQMrUci8mIK7NTSkKOWbl7mas7vj1Hifl/pafdgI17hOyu9Zu3do/pNaVJMteYxFAwpxZWy4rJZIOwW99odMRedVqg5jnD7T4RYZOLJJpZHft7hEwvP7+5eEafNUk/+Kn10fJIJZ6NEV382mqfyqE6VZnNmTkL/VpykQM2NnOGBfid/6yFMHN9UlOrLOYCDlvxoXPnpjNp5Tyq7w9i+olnN+UKpOdurLnK1IEoexgjUpbr/pJ5oBHMbPhwcdDGL+61jauUk2JBLVQnbLEnZFaKikfS35Fmh5dvKRD8aVPIQYFochJG/ar3R/GZZoQ= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FoNkuBWvorpHUjLowZgidaBG9OXPcuGR1L44IjRt+xSExVt7lXztSRHU7WHuKatO2HhioeyMNZAC4pVR9kQTdoUMO+JwD7jeQgwIvvqUpEJbKgxZ5nVsBIpdXGNYF12KOlCGKf+sLBb8uE5C51U5zg3/hwWkK/eBQFgR97uZ384BC/2WwzZ3StiNs/V9aDUp6hn+UTo920mCHLhLrZLThDnyfVvFi3QqRpPA69zVErTUA92mKTNRT/qK61T10KIioZ3yMwcL/DGLgRjnG6ch9aSgEbjT1n/5L0rJoemTNJyJ5iPwtU+TGiKa4Pp8fklwyCZMwnejoe3gxK/z1bVYRq55ckU8IDBwxgF730UENqvwwHUsq4cZmgvNrbXc1ubKEICWmejKUpqJAEO8agnmrNpUEv+IGvxm576N6fsNiuq3auDOKopfM7HgIjE1OJ5eYM/Xcps3MCuO7VcekJC6yxvhFfC2TDg8JVoYILQrSamU/ytWc/qvsNTjLSDm/o5HyeSlNzIYyqnsZVTnWjIH4uyr1plgkwELWmNTwIlxOdD9U2Fqp7JcSVPXjKANdWcaA3BOVH31VNVwGdmml0bzdQrlJOSOGx81s2KatXIurtJzJJin4QnfQB6BuFd2rA+R X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: whD57ISIUI8+7Cii7U+petb/tYQmn+uVsyNs1jajYLTcNuQ2mF6kN9NHOQLBhHaklRQtvu47QNc52phJp3seDZnEmlua/lCBHWIcyaWpRSeasmHG4dqDYq8Er+ck4nmjQuHPkRXtmE7I/xdyuWSazQYxZ21z07eiXTAwL4SHLSvxOp9oN6D+9m85uYtPQ8mDaq3uGo41cWbPBVMNy9ZksKq9qtY3BlVrEeEjqnQuZOicLxO1v4n2NKGbZoOGfaqFqd2MJisb5ZR2UHQAa4epCjp9youtlg+0n3QZ2fyZMlbKAWIniMbhPBVhBBfpDYcZxw3bnrEBFogPU11E2kJ2u82whHy9Da4rajkD/h2Op3k71iPqCJqxjdA8F87QrZpNI9VH5NchZPZ9FqxR8MpvF/dPBQDa8CoOJLQOjqgW6ehQucWmno540E8B60tvWq51YRtfVcjThRQ/uautBXaep33borVCLzGzMg+aBDZDbBMj+LQGW6Pckt0qCYAXWhNyVY8RMnjQxuOMdbL1upGzQBC6xzAJpC/fCCOzqQX7TFbYJrIXqKyRPKJo0LnzQjN/ycl9kQPCXEszNywRKBD/RuHYFmgpepSI1UedzmwHWPoCzmFtuBvVuAdZiUV9sD6EcN9mvBKk1zCs5lkOuRikqrdKg72EyGew5qatwnKfO27NBIF1poqiywA6zzSdu5TLHzB6dYje8fi/hlr6I31OPGs319tuwOIJzU+UOwgwPx9JpedwDOMFyaS3D94MGoXnFZbjWzK26epJOsAq7lY1fdBTnre4Bu+lZumO1IvRrRuNGzjBcra60P5BwYb90f6G0RsaUaVpYVUFkngPWokEhQKxfajduZi+BRLd0frJ973lIYCjt8KBAtll/J247RUGR70nKb8h0lCLz0P7pawM6J45tb5kcda4WMYHkTi8rpLb5j/zFsWfqmXJ9p0d6R/t0Ro+aESrKMKtoEOSObTUpj0idtmcPEwjcDCStw17WE3XHe/SVtrVkttqnW56bt6EGHLNjRSKPaHmdjr/OcLhX00WaFcJMNX6bwc9UcxTuybdi+GilH+24kEA/nqrj9WPtYfnE8pHtTjkNh+V5J9emb4MAM1IMJujJp0UumaBGtPmdyDKwmi1V9dCZF5dynk1tR0+ufh/KlNmAl/WzKoVIvkq9JVgQ9ayKaAKCpMIS51CuLIyezUEplxkFiVpzLzedjrdZ0a673UI5BVW1SRDpA3uy5KfZOUXiTo/dVgAFz1c3Rbh4cRSRs6bI3Y8JtnN+BRmmsEKzOddYUQZrpH6Kg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e6e2e9a-f700-4e70-4240-08dc48835cc3 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:13:41.5945 (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: PAXP250MB0543 Subject: [FFmpeg-devel] [PATCH 06/13] avformat/mux_utils: Don't report that AV_CODEC_ID_NONE can be muxed 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: tTWWOt/w0LkK If AVOutputFormat.video_codec, audio_codec or subtitle_codec is AV_CODEC_ID_NONE, it means that there is no default codec for this format and not that it is supported to mux AV_CODEC_ID_NONE. Signed-off-by: Andreas Rheinhardt --- libavformat/mux_utils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c index 9d811c14e2..841a19a3a2 100644 --- a/libavformat/mux_utils.c +++ b/libavformat/mux_utils.c @@ -39,9 +39,10 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, return ffofmt(ofmt)->query_codec(codec_id, std_compliance); else if (ofmt->codec_tag) return !!av_codec_get_tag2(ofmt->codec_tag, codec_id, &codec_tag); - else if (codec_id == ofmt->video_codec || - codec_id == ofmt->audio_codec || - codec_id == ofmt->subtitle_codec) + else if (codec_id != AV_CODEC_ID_NONE && + (codec_id == ofmt->video_codec || + codec_id == ofmt->audio_codec || + codec_id == ofmt->subtitle_codec)) return 1; } return AVERROR_PATCHWELCOME;