From 660983b7f3f699cd982a0688352604cc9ce3c8c6 Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 6 Oct 2025 10:32:15 -0300 Subject: [PATCH] avformat/mccenc: use Lavf version string instead of FFmpeg The muxed subtitle is created by libavformat, and as such that's what should be reported. This is in line with the string we write for every other muxer. After this change, the muxer will no longer be recompiled every time a commit is made. Signed-off-by: James Almer --- libavformat/mccenc.c | 6 +++--- tests/fate/subtitles.mak | 2 +- tests/ref/fate/sub-mcc-remux | 2 +- tests/ref/fate/sub-mcc-remux-eia608 | 2 +- tests/ref/fate/sub-mcc-remux-eia608-bsf | 2 +- tests/ref/fate/sub-mcc-remux-eia608-recode | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavformat/mccenc.c b/libavformat/mccenc.c index c64d53805d..1c291f75b2 100644 --- a/libavformat/mccenc.c +++ b/libavformat/mccenc.c @@ -23,6 +23,7 @@ #include "avformat.h" #include "internal.h" #include "mux.h" +#include "version.h" #include "libavcodec/codec_id.h" #include "libavcodec/smpte_436m.h" @@ -30,7 +31,6 @@ #include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/error.h" -#include "libavutil/ffversion.h" #include "libavutil/log.h" #include "libavutil/macros.h" #include "libavutil/opt.h" @@ -125,9 +125,9 @@ static int mcc_write_header(AVFormatContext *avf) const char *creation_program = mcc->creation_program; if (!creation_program) { if (avf->flags & AVFMT_FLAG_BITEXACT) - creation_program = "FFmpeg"; + creation_program = "Lavf"; else - creation_program = "FFmpeg version " FFMPEG_VERSION; + creation_program = LIBAVFORMAT_IDENT; } else if (strchr(creation_program, '\n')) { av_log(avf, AV_LOG_FATAL, "creation_program must not contain multiple lines of text\n"); return AVERROR(EINVAL); diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak index 8423e8311a..c8f94c2b5e 100644 --- a/tests/fate/subtitles.mak +++ b/tests/fate/subtitles.mak @@ -133,7 +133,7 @@ fate-sub-rcwt: REF = d86f179094a5752d68aa97d82cf887b0 FATE_SUBTITLES-$(call ALLYES, AVDEVICE LAVFI_INDEV MOVIE_FILTER MPEGTS_DEMUXER MCC_MUXER EIA608_TO_SMPTE436M_BSF) += fate-sub-mcc fate-sub-mcc: CMD = md5 -f lavfi -i "movie=$(TARGET_SAMPLES)/sub/scte20.ts[out0+subcc]" -map 0:s -c copy -override_time_code_rate ntsc -creation_time "1970-01-02T00:00:00" -bitexact -f mcc fate-sub-mcc: CMP = oneline -fate-sub-mcc: REF = 779ca7759324441febd6aa6039f29308 +fate-sub-mcc: REF = 73982c4db86f3a809c1e8262d3701fc2 FATE_SUBTITLES-$(call DEMMUX, MCC, MCC, SMPTE436M_TO_EIA608_BSF EIA608_TO_SMPTE436M_BSF) += fate-sub-mcc-remux-eia608-bsf fate-sub-mcc-remux-eia608-bsf: CMD = fmtstdout mcc -f mcc -i $(SRC_PATH)/tests/ref/fate/sub-mcc-remux -map 0:s -c copy -bsf "eia608_to_smpte436m=cdp_frame_rate=60000/1001:initial_cdp_sequence_cntr=65535:line_number=11" -override_time_code_rate ntsc -creation_time "1970-01-02T00:00:00" diff --git a/tests/ref/fate/sub-mcc-remux b/tests/ref/fate/sub-mcc-remux index a58c040711..57f8ea81d2 100644 --- a/tests/ref/fate/sub-mcc-remux +++ b/tests/ref/fate/sub-mcc-remux @@ -37,7 +37,7 @@ File Format=MacCaption_MCC V2.0 /////////////////////////////////////////////////////////////////////////////////// UUID=0087C4F6-A6B4-5469-8C8E-BBF44950401D -Creation Program=FFmpeg +Creation Program=Lavf Creation Date=Friday, January 2, 1970 Creation Time=00:00:00 Time Code Rate=30DF diff --git a/tests/ref/fate/sub-mcc-remux-eia608 b/tests/ref/fate/sub-mcc-remux-eia608 index f31562d524..00f2fd4244 100644 --- a/tests/ref/fate/sub-mcc-remux-eia608 +++ b/tests/ref/fate/sub-mcc-remux-eia608 @@ -37,7 +37,7 @@ File Format=MacCaption_MCC V2.0 /////////////////////////////////////////////////////////////////////////////////// UUID=0087C4F6-A6B4-5469-8C8E-BBF44950401D -Creation Program=FFmpeg +Creation Program=Lavf Creation Date=Friday, January 2, 1970 Creation Time=00:00:00 Time Code Rate=30DF diff --git a/tests/ref/fate/sub-mcc-remux-eia608-bsf b/tests/ref/fate/sub-mcc-remux-eia608-bsf index c0e125db5e..6b14302226 100644 --- a/tests/ref/fate/sub-mcc-remux-eia608-bsf +++ b/tests/ref/fate/sub-mcc-remux-eia608-bsf @@ -37,7 +37,7 @@ File Format=MacCaption_MCC V2.0 /////////////////////////////////////////////////////////////////////////////////// UUID=0087C4F6-A6B4-5469-8C8E-BBF44950401D -Creation Program=FFmpeg +Creation Program=Lavf Creation Date=Friday, January 2, 1970 Creation Time=00:00:00 Time Code Rate=30DF diff --git a/tests/ref/fate/sub-mcc-remux-eia608-recode b/tests/ref/fate/sub-mcc-remux-eia608-recode index f31562d524..00f2fd4244 100644 --- a/tests/ref/fate/sub-mcc-remux-eia608-recode +++ b/tests/ref/fate/sub-mcc-remux-eia608-recode @@ -37,7 +37,7 @@ File Format=MacCaption_MCC V2.0 /////////////////////////////////////////////////////////////////////////////////// UUID=0087C4F6-A6B4-5469-8C8E-BBF44950401D -Creation Program=FFmpeg +Creation Program=Lavf Creation Date=Friday, January 2, 1970 Creation Time=00:00:00 Time Code Rate=30DF