[PR] avcodec/bsf/{eac3,truehd}_core: clear profile value on init() (PR #23957)
James Almer via ffmpeg-devel <[email protected]> Thu, 30 Jul 2026 00:51:48 -0000
| Newsgroups | gmane.comp.video.ffmpeg.devel |
|---|---|
| Message-ID | <178537270939.51.12302437437771137257@29965ddac10e> |
PR #23957 opened by James Almer (jamrial) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23957 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23957.patch The output stream no longer has Atmos metadata, so the AV_PROFILE_EAC3_DDP_ATMOS and AV_PROFILE_TRUEHD_ATMOS profiles, if they were set, are no longer valid. >From a49dd713fd5cc0591da97cba8b80e561bbab7a98 Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Wed, 29 Jul 2026 21:45:37 -0300 Subject: [PATCH 1/2] avcodec/bsf/eac3_core: clear profile value on init() The output stream no longer has Atmos metadata, so the AV_PROFILE_EAC3_DDP_ATMOS profile, if it was set, is no longer valid. Signed-off-by: James Almer <[email protected]> --- libavcodec/bsf/eac3_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/bsf/eac3_core.c b/libavcodec/bsf/eac3_core.c index 4fd0d962d3..da35381951 100644 --- a/libavcodec/bsf/eac3_core.c +++ b/libavcodec/bsf/eac3_core.c @@ -23,6 +23,13 @@ #include "libavcodec/get_bits.h" #include "libavcodec/ac3_parser_internal.h" +static int eac3_core_init(AVBSFContext *ctx) +{ + ctx->par_out->profile = AV_PROFILE_UNKNOWN; + + return 0; +} + static int eac3_core_filter(AVBSFContext *ctx, AVPacket *pkt) { AC3HeaderInfo hdr; @@ -82,5 +89,6 @@ static const enum AVCodecID codec_ids[] = { const FFBitStreamFilter ff_eac3_core_bsf = { .p.name = "eac3_core", .p.codec_ids = codec_ids, + .init = eac3_core_init, .filter = eac3_core_filter, }; -- 2.52.0 >From 45ae186d2d411297d4786e2f5bbfaf12bebca19f Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Wed, 29 Jul 2026 21:45:53 -0300 Subject: [PATCH 2/2] avcodec/bsf/truehd_core: clear profile value on init() The output stream no longer has Atmos metadata, so the AV_PROFILE_TRUEHD_ATMOS profile, if it was set, is no longer valid. Fixes issue #23195. Signed-off-by: James Almer <[email protected]> --- libavcodec/bsf/truehd_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/bsf/truehd_core.c b/libavcodec/bsf/truehd_core.c index bb113593ad..68c95b622c 100644 --- a/libavcodec/bsf/truehd_core.c +++ b/libavcodec/bsf/truehd_core.c @@ -34,6 +34,13 @@ typedef struct TrueHDCoreContext { MLPHeaderInfo hdr; } TrueHDCoreContext; +static int truehd_core_init(AVBSFContext *ctx) +{ + ctx->par_out->profile = AV_PROFILE_UNKNOWN; + + return 0; +} + static int truehd_core_filter(AVBSFContext *ctx, AVPacket *pkt) { TrueHDCoreContext *s = ctx->priv_data; @@ -177,6 +184,7 @@ const FFBitStreamFilter ff_truehd_core_bsf = { .p.name = "truehd_core", .p.codec_ids = codec_ids, .priv_data_size = sizeof(TrueHDCoreContext), + .init = truehd_core_init, .filter = truehd_core_filter, .flush = truehd_core_flush, }; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]