This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 04ae5788dfe4690e8a95110455b1ef6835f04fe4 Author: James Almer <[email protected]> AuthorDate: Fri May 29 18:32:15 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Tue Jun 2 19:50:39 2026 -0300 avcodec/itut35: add support for Active Format Description Needed by h2645_sei. Signed-off-by: James Almer <[email protected]> --- libavcodec/itut35.c | 20 ++++++++++++++++++++ libavcodec/itut35.h | 1 + 2 files changed, 21 insertions(+) diff --git a/libavcodec/itut35.c b/libavcodec/itut35.c index c811d7590a..0345bc6f4e 100644 --- a/libavcodec/itut35.c +++ b/libavcodec/itut35.c @@ -62,6 +62,12 @@ int ff_itut_t35_parse_buffer(FFITUTT35 *const itut_t35, const uint8_t *buf, return AVERROR_INVALIDDATA; provider_oriented_code = bytestream2_get_be32u(&gb); switch (provider_oriented_code) { + case MKBETAG('D', 'T', 'G', '1'): // afd_data + if (bytestream2_get_bytes_left(&gb) < 2) + return AVERROR_INVALIDDATA; + if (!(bytestream2_get_byteu(&gb) & 0x40)) // active_format_flag + return 0; //ignore + break; case MKBETAG('G', 'A', '9', '4'): // closed captions break; default: // ignore unsupported identifiers @@ -151,6 +157,14 @@ int ff_itut_t35_parse_payload_to_struct(FFITUTT35 *const itut_t35, FFITUTT35Aux break; case ITU_T_T35_PROVIDER_CODE_ATSC: switch (itut_t35->provider_oriented_code) { + case MKBETAG('D', 'T', 'G', '1'): // afd_data + metadata->afd = av_buffer_alloc(1); + if (!metadata->afd) + return AVERROR(ENOMEM); + + *metadata->afd->data = *itut_t35->payload & 0xf; + + break; case MKBETAG('G', 'A', '9', '4'): // closed captions ret = ff_parse_a53_cc(&metadata->a53_cc, itut_t35->payload, itut_t35->payload_size); if (ret < 0) @@ -259,6 +273,12 @@ int ff_itut_t35_parse_payload_to_frame(FFITUTT35 *const itut_t35, FFITUTT35Aux * if (ret < 0) return ret; + if (metadata.afd) { + if (!av_frame_new_side_data_from_buf(frame, AV_FRAME_DATA_AFD, metadata.afd)) + av_buffer_unref(&metadata.afd); + metadata.afd = NULL; + } + if (metadata.a53_cc) { ret = ff_frame_new_side_data_from_buf(avctx, frame, AV_FRAME_DATA_A53_CC, &metadata.a53_cc); if (ret < 0) diff --git a/libavcodec/itut35.h b/libavcodec/itut35.h index 72cadc13ea..abe56dd849 100644 --- a/libavcodec/itut35.h +++ b/libavcodec/itut35.h @@ -58,6 +58,7 @@ typedef struct FFITUTT35 { } FFITUTT35; typedef struct FFITUTT35Meta { + AVBufferRef *afd; AVBufferRef *a53_cc; AVBufferRef *lcevc; AVBufferRef *hdr_plus; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
