PR #21205 opened by Gyan Doshi (GyanD) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21205 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21205.patch
I'm writing a py script which prepares 1) for each muxer, a list of the codec IDs it accepts. 2) for each codec ID, a list of the muxers which accept it. Out of 184 muxers in git master, I've identified 65 where neither `.p.codec_tag` nor `.query_codec` is populated and neither is the flag `FF_OFMT_FLAG_ONLY_DEFAULT_CODECS` set i.e. the muxer accepts multiple codecs but there is no standardized data structure containing that list. Codec acceptance is tested usually via a switch or if-else block in init or write_header. So, I'm about to start the process of adding codec tag lists for all such muxers. But before I start, this is a RFC patch for this project, for the base idea as well as implementation. >From 3a44733e2e5df161972515d37a8e95047456c97a Mon Sep 17 00:00:00 2001 From: Gyan Doshi <[email protected]> Date: Mon, 15 Dec 2025 17:41:02 +0530 Subject: [PATCH] avformat/a64: add codec tag list --- libavformat/a64.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavformat/a64.c b/libavformat/a64.c index 6e722c7e9f..f0db77d513 100644 --- a/libavformat/a64.c +++ b/libavformat/a64.c @@ -60,6 +60,12 @@ static int a64_write_header(AVFormatContext *s) return 0; } +static const AVCodecTag codec_a64_tags[] = { + { AV_CODEC_ID_A64_MULTI, 0 }, + { AV_CODEC_ID_A64_MULTI5, 0 }, + { AV_CODEC_ID_NONE, 0 } +}; + const FFOutputFormat ff_a64_muxer = { .p.name = "a64", .p.long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"), @@ -67,6 +73,7 @@ const FFOutputFormat ff_a64_muxer = { .p.video_codec = AV_CODEC_ID_A64_MULTI, .p.audio_codec = AV_CODEC_ID_NONE, .p.subtitle_codec = AV_CODEC_ID_NONE, + .p.codec_tag = (const AVCodecTag* const []){ codec_a64_tags, 0 }, .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, .write_header = a64_write_header, .write_packet = ff_raw_write_packet, -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
