avcodec/parsers: Add macro to set list of codec ids

The current code relies on AV_CODEC_ID_NONE being zero, so that
unused codec ids are set to their proper value. This commit adds
a macro to set unset ids to AV_CODEC_ID_NONE.

(The actual rationale for this macro is to simplify
the transition to making the private fields that are
currently public in avcodec.h really private.)

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2025-10-26 13:16:27 +01:00
parent 12f7a7724d
commit e9fe30ccd1
67 changed files with 174 additions and 72 deletions

View file

@ -22,6 +22,7 @@
#include "sbc.h"
#include "parser.h"
#include "parser_internal.h"
typedef struct SBCParseContext {
ParseContext pc;
@ -117,7 +118,7 @@ static int sbc_parse(AVCodecParserContext *s, AVCodecContext *avctx,
}
const AVCodecParser ff_sbc_parser = {
.codec_ids = { AV_CODEC_ID_SBC },
PARSER_CODEC_LIST(AV_CODEC_ID_SBC),
.priv_data_size = sizeof(SBCParseContext),
.parser_parse = sbc_parse,
.parser_close = ff_parse_close,