From a566fcb9dc07262b0c6575466ce8cbc8b667e5b2 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Tue, 22 Jul 2025 23:14:34 -0700 Subject: [PATCH] lavf: mxf [de]muxer now uses AV_CODEC_ID_SMPTE_436M_ANC instead of ..._NONE this makes it easier to match against when using that format from other parts of ffmpeg. Signed-off-by: Jacob Lifshay --- doc/APIchanges | 4 ++++ libavformat/mxfdec.c | 6 ++---- libavformat/mxfenc.c | 3 ++- libavformat/version.h | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index c43d2d7711..7443884885 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2025-03-28 API changes, most recent first: +2025-07-10 - xxxxxxxxxx - lavf 62.2.100 + mxf [de]muxer now uses AV_CODEC_ID_SMPTE_436M_ANC for + the vbi_vanc_smpte_436M streams instead of AV_CODEC_ID_NONE. + 2025-07-10 - xxxxxxxxxx - lavc 62.10.100 - codec_id.h Add AV_CODEC_ID_SMPTE_436M_ANC. diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 06987ad818..dc5dff651a 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1685,7 +1685,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = { static const MXFCodecUL mxf_data_essence_container_uls[] = { { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0d,0x00,0x00 }, 16, AV_CODEC_ID_NONE, "vbi_smpte_436M", 11 }, - { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 }, 16, AV_CODEC_ID_NONE, "vbi_vanc_smpte_436M", 11 }, + { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x0e,0x00,0x00 }, 16, AV_CODEC_ID_SMPTE_436M_ANC, "vbi_vanc_smpte_436M", 11 }, { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x09,0x0d,0x01,0x03,0x01,0x02,0x13,0x01,0x01 }, 16, AV_CODEC_ID_TTML }, { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE }, }; @@ -3115,9 +3115,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) st->codecpar->codec_type = type; if (container_ul->desc) av_dict_set(&st->metadata, "data_type", container_ul->desc, 0); - if (mxf->eia608_extract && - container_ul->desc && - !strcmp(container_ul->desc, "vbi_vanc_smpte_436M")) { + if (mxf->eia608_extract && st->codecpar->codec_id == AV_CODEC_ID_SMPTE_436M_ANC) { st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE; st->codecpar->codec_id = AV_CODEC_ID_EIA_608; } diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 8470e5bcd2..01a749a588 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -3074,7 +3074,8 @@ static int mxf_init(AVFormatContext *s) return ret; } else if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA) { AVDictionaryEntry *e = av_dict_get(st->metadata, "data_type", NULL, 0); - if (e && !strcmp(e->value, "vbi_vanc_smpte_436M")) { + if ((e && !strcmp(e->value, "vbi_vanc_smpte_436M")) + || st->codecpar->codec_id == AV_CODEC_ID_SMPTE_436M_ANC) { sc->index = INDEX_S436M; } else { av_log(s, AV_LOG_ERROR, "track %d: unsupported data type\n", i); diff --git a/libavformat/version.h b/libavformat/version.h index 36ccf6ecff..904e7f06aa 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -31,8 +31,8 @@ #include "version_major.h" -#define LIBAVFORMAT_VERSION_MINOR 1 -#define LIBAVFORMAT_VERSION_MICRO 103 +#define LIBAVFORMAT_VERSION_MINOR 2 +#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \