From patchwork Wed Mar 20 02:12:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47256 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8ba5:b0:1a3:31a3:7958 with SMTP id m37csp121300pzh; Tue, 19 Mar 2024 19:14:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUkIVA4lRk/9PMRhlRVNJtAlm3cLfPHYpqJEG14qp1dMLvqIxo7Gh9PD9tcOx6Pa2tOvoG+9hMCZ4BjccR99+1OwCW1nQ8GTLtUUA== X-Google-Smtp-Source: AGHT+IGlquzkd5zdhtlEd1k6rn11VQmi6erlKRXY/zvNmzzQrYT8OVxEA9iZOHJu/ZZH+HOrKgjd X-Received: by 2002:a17:906:c14d:b0:a46:edfb:ff68 with SMTP id dp13-20020a170906c14d00b00a46edfbff68mr914679ejc.5.1710900892478; Tue, 19 Mar 2024 19:14:52 -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 qk43-20020a1709077fab00b00a46bb764166si2736037ejc.392.2024.03.19.19.14.52; Tue, 19 Mar 2024 19:14:52 -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=AOZ5zXkO; 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 A3D6F68D4A6; Wed, 20 Mar 2024 04:14:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2037.outbound.protection.outlook.com [40.92.59.37]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7813068D401 for ; Wed, 20 Mar 2024 04:14:14 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F33iFw1tSm4f6AsxbtAfeiAosxUACaKiArVt1aXdYmmnxG2Q+eq+nK0PsoF3wHgQUu2mbhLGIViJGhSuWPhnZ+iBi732Wd7kqELfJYewqt8ttB79FlLFkA0EOkYAjVgVDd+D4WusDy796e1Rf/O4PUIoQfBvnhMvGAuQdRk1gs5V8T3+eyqEArndkWZFRQizE7CAD6L1kG8asAjOVDHqGURcOVgRRFk/yx4Qwostg9iTZdEXiaQWCT3VolgWQrF0Qyj1DGC2SAtrkfhiYX0S+IhLF7oo8FeOmZLPGVeX73ny2wwLbOCT3CkkVs1CaO+8/s8x/98rdFMOEWKTxXkiHw== 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=jdUqw+bra+HmSvS44Z2+agZ4JdrLWONhyEPMXnDiwQE=; b=VJhKHGmzaVTqWtlbSSbmFIP3hWwkmXVEh5xleDcQDaJ9Wwc1dx6qnnrkvpQNv6uRPGiajsGDYKyfhyH3fioaLz3O+HahhTcL2+2HGbodukof7zbxyDQ6fucaYmBr9BUh/8hiVBP/vezLfbvsfoVmEqIirOjGFvhwAyYclquhWWoD3stYaLbkHEOnAeMd2lQ5uTyLlnHJ66d/N2fsw1LnCBAtgayK2K/PXMVNJ8H2JVIao4OZ53zRc2DLGMpelDquQes8hGfVklaMDpLIvWeiwxm9IOyzPRN9grIjSMQp8wWjw9RYdUYb7YzGuJPXdHs11E8tk7SZoi8nfRavDZWMLQ== 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=jdUqw+bra+HmSvS44Z2+agZ4JdrLWONhyEPMXnDiwQE=; b=AOZ5zXkOwI2hSTPhm4WbTkPFh8lrvRLCPn65/i12u+WMWk9ocfFydC6O3FcgW9r0YbsOxKlJjYFqDJcY6C3jyQXULyaQ10gwhTbl4USrXqK6ziaxv24kuJ/YHxXkNzWu3jNzcTxLg12CtABd0bOvmEeoSdtCGCTMud7+iq/sqXPOjQaROyeHiRkLxMVeDgfrQuaoGWoMeT0wIfyM8ZOZZZtbXDEaLBUXi+oCsQn15XlDCpYlUuIRGKrn4lm9k9bWp1U3aU4g66QKSgJUYWpFdiL9Okl5A/KJrW8dWNUu3j7waxCBLeuAIXG6hc0cJ0C99tMVBewzSMGc0ekf09CpTA== 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:14:12 +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:14:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Mar 2024 03:12:55 +0100 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [iNppyS2VRetMmR2pE11emMc3nKn6GQfah+HYamhJp7E=] 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-11-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: ab761b44-781a-42d7-b272-08dc48836f28 X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnpHlru1h1vRfamsRCbuNA5UsDcyySU/5zQKgtW54Lg/cFgwPgFpP+G0amyHDVurfvxH6WE4yesu0TTNs+w0jRNe+lDwPaGX6PMotmuPYzWkN2FoPWQCLcMuS4AUVtu9iqJ5dkHjxzzRV+uidbJwPEvub6eJDL4TtLCeNel06RdjRkFsWHfL0wHTJ+/yzMDhtC/S42Sityhx5BxhNTKgLZolQp5W186lJVNzybNqe+NKotwP0she87oxYGLU2wTjf6/8HQJ6efIOANgPPZS4ount75pGGe9+xQoMJRjD5IgS0iQzqFnJZoLlqUehRZF8+MKetOs7Msy1cGYh3MBTSb/M6gB3qfDDY1wqzylC0R/NOfu2arYVduVBeHqxQhIM2gx1IOMVQL5agEAD4GBHV5TNiHmbwbEtIdX3SxK2ooNM/Avp1EaaLPk7ZrIwOumTbRcoZwZu52b66sKsN9IPrMjXw6eRKFLXULvRR7qJUpDVbJrwsRvFaAqP+M5DKy5dTT3pzbOe3E4dpR0gNYU7SlQw5IAxCq04I7WrY4QwnLQ6ocgyiaED/BRyS95qZ28aNrg7cmbrXp02jWO8MovOcyzvbn4WYDies74sgMZE0ZF3kwZPCYcZr8ybSjpQ7RJef40CNY2A2RkFObMeAN1Ea45PEuU1KyZl2LypqDm0Jty2jB/5/2MLPJ7QJbGYBQkUODBUbBfLF0jM2ZGcvAiImVg13+k+InenaBxr0qtCd6zfqBLVyrV7yB9CR56rW7xypE4= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9td6r5bTwDuByFuuZmO+I2TvIhj4S5kEyTkJVYKI5DYVnEdBk5UvnoTYfp1X6FktNNL2wydqJ4dk/sq04FyaBv9UE0hdFcU7SNIGNvkUauvV77HK0wyFMIKT1EKNYM5dYW19Rf8qgkOCfKjLsGxjVNZppGmlVANU/pSpfffn2pJ2oBjL2+zYxrHMAKvaikxRZrEMym9nNShrKHrvLbcloDPnbAbIYRPU5skSsLDPz/0khX4rk9E8Nnmr1GHKgypWNpd++NNj9O6Fbk5xAz7/nRwDpDWbS9hHTZAGId9SuFk0fSsFYBadsAiw3Qxzm9VFHUjZQ6B9rMIDHVBqs7bmzJn5N3SvxWHSj15cpz339QZuVAW5SCLktO+JaWIwcRbW5/HZIGnQ9DmpM5DUwEqauF4a4808RBReWy404/Hb1JSOiqLnNc2Uk8PqdDxCRGq10RCk74ig8Lq+KUQL1ijssGaaQMuXCaw11HthG1DJAcebAUNMuU0wb7TWkqQJFqLEG9hsvXdT/H+dvPaPyJNjkqMn+N4PwmE0bPbb00jvOz3FYuh54XyxhI5hMCK/DG5/w35Ck8XOWy6m829qNCGBPVdogbJFm9SYhIkcrWMdO9GSINydQoh7tFplUjowu5G7 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LztPIcsrcXWcDd807cva4g71ds54aLxGl3dWh2M78O/2EIacchCW9tFF6yT8c3M78Ujd70LMuzrnddgDfm+AW91k9tEPXc83NDXh231KIt7r6n95E1hiDhCga660VW5MMvzm52INiB7QRKeU5fh01JerLhpBk1G3VtGNxZBQr/wIsJ7oaQh5gDw0DGdd8Q2opV3fat9gjj11Y+Vqcr0pa7SrAlvUScOY0l+hSau1oujKd5vNyBWQtLvJZee5MKErgqOaFUoPwloGeEJoXh4u+Lb4DJkzubEXIWialf5zEZ52itIOqXVBHQzw9JGCR4HYJL8Jf7kEdzJYktd2yMhgeDjiXoEOOj8bLRyNWYRREJRcmEhWZ3VTBM9GGiRJAqiGMmeacPDLj1374xiiKJwoNadv93ryDJ05/gEyrVVjB5glJTjBip16awxq8w/w5k1/odeXoH944WLcpChilCZf8ZR4zE2vR+R/SzGfr+QNI6//x2uIVLiUd6K9vVTyXcTExJd+APz2zz8AUlkEO3SjybOZzuqys5ScHweZLp26XO0qY3eprHkPbrFWkVYEjQn6m8c2rc9eESN5JAW8SYXebfk4WKG5mQ05DMgVusxWb5pVXTgxHdsmebUVPM6oUlCBCS4VB24wb4xMJ0IU7NVY2fhw2KLyV8lL3iwGCQt4RKCVSmmVAmDrnYsTlUULxD141C5l4Qp9k5Q0AIMAJWLjcv6SYk6Fx/vapg44rvaVD5TCuLhtykStwBnrH+zBticzWGb3vMgjrE/dg8KxzIqVNu9xJ7KzNUBCp9xZ7XjckufoQfs0+WoK1qzjBCGVSzEu9Y5spZf1Z/JLLcPJC0lPUgHYs29uoYumkaZX30oVLbutSGSSH5Y8QJpFJ7TdC5g1Jg8qLCoUMuOGkZhJUKRHbC8ukbvtsm00pwxlAUYy2fssK07TAKEDs8HfjnbNn+2OxFpMwBMD25mue13ZTLc/0Uqs4clNGlczI9pKRbb7XMXektv1MeQPv7tCJugPpn9VxvCGrMYpCTg+4c/RcZhHPQvrYErGkluShx5fIJMu8sCD6WGY4bHuy/cSf5l7EWe/NUDIA61GMX8es0GrCNVGPy9nHzGmwE1xBFK+UjiJVwXg34m/g0wrYumrEejVp4UWb8NM0lIEVOwBKsJK7Nt4IC0N8LHH4cfUCtktsIUcFXJaOsrFTx5+3nAlT4urCvUrdBEL6z+/Q6gdjDn26mbnlURQpdc6t8lNP3tWFoIUj1vlL5ycbkr38k+EasZHYZX2LymVtuX/b1PIppLla+vCRw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab761b44-781a-42d7-b272-08dc48836f28 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:14:12.4428 (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 12/13] avformat: Enforce codec_id where appropriate 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: YhMCMOhX9zfP E.g. chromaprint expects to be fed 16bit signed PCM in native endianness, yet there was no check for this. Similarly for other muxers. Use the new FF_OFMT_FLAG_ONLY_DEFAULT_CODECS to enfore this where appropriate, e.g. for pcm/raw muxers. Signed-off-by: Andreas Rheinhardt --- libavformat/chromaprint.c | 3 +- libavformat/daudenc.c | 3 +- libavformat/filmstripenc.c | 3 +- libavformat/fitsenc.c | 3 +- libavformat/idroqenc.c | 3 +- libavformat/jacosubenc.c | 3 +- libavformat/mmf.c | 3 +- libavformat/mpjpeg.c | 2 + libavformat/pcmenc.c | 3 +- libavformat/rawenc.c | 102 ++++++++++++++++++++++++------------- libavformat/ttaenc.c | 3 +- 11 files changed, 88 insertions(+), 43 deletions(-) diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c index 62264d6a4b..4beb75c7a9 100644 --- a/libavformat/chromaprint.c +++ b/libavformat/chromaprint.c @@ -179,7 +179,8 @@ const FFOutputFormat ff_chromaprint_muxer = { .p.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE), .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_header = write_header, .write_packet = write_packet, .write_trailer = write_trailer, diff --git a/libavformat/daudenc.c b/libavformat/daudenc.c index f1e0da058b..5c8db5104e 100644 --- a/libavformat/daudenc.c +++ b/libavformat/daudenc.c @@ -64,7 +64,8 @@ const FFOutputFormat ff_daud_muxer = { .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, .p.flags = AVFMT_NOTIMESTAMPS, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .init = daud_init, .write_packet = daud_write_packet, }; diff --git a/libavformat/filmstripenc.c b/libavformat/filmstripenc.c index b2a4cee8fa..ec9c814f8c 100644 --- a/libavformat/filmstripenc.c +++ b/libavformat/filmstripenc.c @@ -67,7 +67,8 @@ const FFOutputFormat ff_filmstrip_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_RAWVIDEO, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_header = write_header, .write_packet = ff_raw_write_packet, .write_trailer = write_trailer, diff --git a/libavformat/fitsenc.c b/libavformat/fitsenc.c index 605056af59..a8efe93d3c 100644 --- a/libavformat/fitsenc.c +++ b/libavformat/fitsenc.c @@ -199,7 +199,8 @@ const FFOutputFormat ff_fits_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_FITS, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .priv_data_size = sizeof(FITSContext), .write_header = fits_write_header, .write_packet = fits_write_packet, diff --git a/libavformat/idroqenc.c b/libavformat/idroqenc.c index 75a191189c..f3172692e0 100644 --- a/libavformat/idroqenc.c +++ b/libavformat/idroqenc.c @@ -67,7 +67,8 @@ const FFOutputFormat ff_roq_muxer = { .p.audio_codec = AV_CODEC_ID_ROQ_DPCM, .p.video_codec = AV_CODEC_ID_ROQ, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_header = roq_write_header, .write_packet = ff_raw_write_packet, }; diff --git a/libavformat/jacosubenc.c b/libavformat/jacosubenc.c index a792fda42e..428505e51f 100644 --- a/libavformat/jacosubenc.c +++ b/libavformat/jacosubenc.c @@ -39,7 +39,8 @@ const FFOutputFormat ff_jacosub_muxer = { .p.video_codec = AV_CODEC_ID_NONE, .p.audio_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_JACOSUB, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_header = jacosub_write_header, .write_packet = ff_raw_write_packet, }; diff --git a/libavformat/mmf.c b/libavformat/mmf.c index fab4509711..42a88cff90 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -320,7 +320,8 @@ const FFOutputFormat ff_mmf_muxer = { .p.audio_codec = AV_CODEC_ID_ADPCM_YAMAHA, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_header = mmf_write_header, .write_packet = ff_raw_write_packet, .write_trailer = mmf_write_trailer, diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c index 81ace8e9ee..8641c9c670 100644 --- a/libavformat/mpjpeg.c +++ b/libavformat/mpjpeg.c @@ -70,6 +70,8 @@ const FFOutputFormat ff_mpjpeg_muxer = { .priv_data_size = sizeof(MPJPEGContext), .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_MJPEG, + .p.subtitle_codec = AV_CODEC_ID_NONE, + .flags_internal = FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_header = mpjpeg_write_header, .write_packet = mpjpeg_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, diff --git a/libavformat/pcmenc.c b/libavformat/pcmenc.c index 4879f1deed..c4dd8e43c5 100644 --- a/libavformat/pcmenc.c +++ b/libavformat/pcmenc.c @@ -35,7 +35,8 @@ const FFOutputFormat ff_pcm_ ## name_ ## _muxer = { \ .p.video_codec = AV_CODEC_ID_NONE, \ .p.subtitle_codec = AV_CODEC_ID_NONE, \ .p.flags = AVFMT_NOTIMESTAMPS, \ - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, \ + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | \ + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, \ .write_packet = ff_raw_write_packet, \ }; #define PCMDEF_2(name, long_name, ext, codec, enabled) \ diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c index 49dc0a9109..cf298d223d 100644 --- a/libavformat/rawenc.c +++ b/libavformat/rawenc.c @@ -45,7 +45,8 @@ const FFOutputFormat ff_ac3_muxer = { .p.audio_codec = AV_CODEC_ID_AC3, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -78,7 +79,8 @@ const FFOutputFormat ff_adx_muxer = { .p.audio_codec = AV_CODEC_ID_ADPCM_ADX, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .write_trailer = adx_write_trailer, .p.flags = AVFMT_NOTIMESTAMPS, @@ -93,7 +95,8 @@ const FFOutputFormat ff_aptx_muxer = { .p.audio_codec = AV_CODEC_ID_APTX, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -107,7 +110,8 @@ const FFOutputFormat ff_aptx_hd_muxer = { .p.audio_codec = AV_CODEC_ID_APTX_HD, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -121,7 +125,8 @@ const FFOutputFormat ff_avs2_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_AVS2, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -135,7 +140,8 @@ const FFOutputFormat ff_avs3_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_AVS3, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -150,7 +156,8 @@ const FFOutputFormat ff_cavsvideo_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_CAVS, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -163,7 +170,8 @@ const FFOutputFormat ff_codec2raw_muxer = { .p.audio_codec = AV_CODEC_ID_CODEC2, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -197,7 +205,8 @@ const FFOutputFormat ff_dfpwm_muxer = { .p.audio_codec = AV_CODEC_ID_DFPWM, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -211,7 +220,8 @@ const FFOutputFormat ff_dirac_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_DIRAC, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -225,7 +235,8 @@ const FFOutputFormat ff_dnxhd_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_DNXHD, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -240,7 +251,8 @@ const FFOutputFormat ff_dts_muxer = { .p.audio_codec = AV_CODEC_ID_DTS, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -255,7 +267,8 @@ const FFOutputFormat ff_eac3_muxer = { .p.audio_codec = AV_CODEC_ID_EAC3, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -270,7 +283,8 @@ const FFOutputFormat ff_g722_muxer = { .p.audio_codec = AV_CODEC_ID_ADPCM_G722, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -285,7 +299,8 @@ const FFOutputFormat ff_g723_1_muxer = { .p.audio_codec = AV_CODEC_ID_G723_1, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -298,7 +313,8 @@ const FFOutputFormat ff_g726_muxer = { .p.audio_codec = AV_CODEC_ID_ADPCM_G726, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -311,7 +327,8 @@ const FFOutputFormat ff_g726le_muxer = { .p.audio_codec = AV_CODEC_ID_ADPCM_G726LE, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -326,7 +343,8 @@ const FFOutputFormat ff_gsm_muxer = { .p.audio_codec = AV_CODEC_ID_GSM, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -341,7 +359,8 @@ const FFOutputFormat ff_h261_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_H261, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -356,7 +375,8 @@ const FFOutputFormat ff_h263_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_H263, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -379,7 +399,8 @@ const FFOutputFormat ff_h264_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_H264, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .check_bitstream = h264_check_bitstream, .p.flags = AVFMT_NOTIMESTAMPS, @@ -403,7 +424,8 @@ const FFOutputFormat ff_vvc_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_VVC, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .check_bitstream = vvc_check_bitstream, .p.flags = AVFMT_NOTIMESTAMPS, @@ -427,7 +449,8 @@ const FFOutputFormat ff_hevc_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_HEVC, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .check_bitstream = hevc_check_bitstream, .p.flags = AVFMT_NOTIMESTAMPS, @@ -442,7 +465,8 @@ const FFOutputFormat ff_evc_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_EVC, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -456,7 +480,8 @@ const FFOutputFormat ff_m4v_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_MPEG4, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -471,7 +496,8 @@ const FFOutputFormat ff_mjpeg_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_MJPEG, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -485,7 +511,8 @@ const FFOutputFormat ff_mlp_muxer = { .p.audio_codec = AV_CODEC_ID_MLP, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -500,7 +527,8 @@ const FFOutputFormat ff_mp2_muxer = { .p.audio_codec = AV_CODEC_ID_MP2, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -515,7 +543,8 @@ const FFOutputFormat ff_mpeg1video_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_MPEG1VIDEO, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -529,7 +558,8 @@ const FFOutputFormat ff_mpeg2video_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_MPEG2VIDEO, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -549,7 +579,8 @@ const FFOutputFormat ff_obu_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_AV1, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .check_bitstream = obu_check_bitstream, .p.flags = AVFMT_NOTIMESTAMPS, @@ -578,7 +609,8 @@ const FFOutputFormat ff_sbc_muxer = { .p.audio_codec = AV_CODEC_ID_SBC, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -592,7 +624,8 @@ const FFOutputFormat ff_truehd_muxer = { .p.audio_codec = AV_CODEC_ID_TRUEHD, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; @@ -606,7 +639,8 @@ const FFOutputFormat ff_vc1_muxer = { .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_VC1, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_packet = ff_raw_write_packet, .p.flags = AVFMT_NOTIMESTAMPS, }; diff --git a/libavformat/ttaenc.c b/libavformat/ttaenc.c index 661aa8fc83..671820f00e 100644 --- a/libavformat/ttaenc.c +++ b/libavformat/ttaenc.c @@ -169,7 +169,8 @@ const FFOutputFormat ff_tta_muxer = { .p.audio_codec = AV_CODEC_ID_TTA, .p.video_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, - .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .init = tta_init, .deinit = tta_deinit, .write_header = tta_write_header,