This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 29e0d0ef13347b80c5df7e62beb99803bc065c0a Author: James Almer <[email protected]> AuthorDate: Thu Mar 12 20:43:23 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Sun Mar 15 17:46:51 2026 -0300 avcodec/h2645_sei: fix parsing payloads for UK country_code The correct syntax after country_code is: t35_uk_country_code_second_octet b(8) t35_uk_manufacturer_code_first_octet b(8) t35_uk_manufacturer_code_second_octet b(8) Signed-off-by: James Almer <[email protected]> (cherry picked from commit 8172be423e05f9abe91432ec8dcb2ecf93a1e86d) --- libavcodec/h2645_sei.c | 12 ++++++++++-- libavcodec/itut35.h | 4 +--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c index a6bdb8b817..332371e5c0 100644 --- a/libavcodec/h2645_sei.c +++ b/libavcodec/h2645_sei.c @@ -159,10 +159,11 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb, } /* itu_t_t35_payload_byte follows */ - provider_code = bytestream2_get_be16u(gb); switch (country_code) { case ITU_T_T35_COUNTRY_CODE_US: + provider_code = bytestream2_get_be16u(gb); + switch (provider_code) { case ITU_T_T35_PROVIDER_CODE_ATSC: { uint32_t user_identifier; @@ -230,12 +231,17 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb, } break; case ITU_T_T35_COUNTRY_CODE_UK: + bytestream2_skipu(gb, 1); // t35_uk_country_code_second_octet + if (bytestream2_get_bytes_left(gb) < 2) + return AVERROR_INVALIDDATA; + + provider_code = bytestream2_get_be16u(gb); + switch (provider_code) { case ITU_T_T35_PROVIDER_CODE_VNOVA: if (bytestream2_get_bytes_left(gb) < 2) return AVERROR_INVALIDDATA; - bytestream2_skipu(gb, 1); // user_data_type_code return decode_registered_user_data_lcevc(&h->lcevc, gb); default: break; @@ -246,6 +252,8 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb, const uint16_t cuva_provider_oriented_code = 0x0005; uint16_t provider_oriented_code; + provider_code = bytestream2_get_be16u(gb); + switch (provider_code) { case ITU_T_T35_PROVIDER_CODE_HDR_VIVID: if (!IS_HEVC(codec_id)) diff --git a/libavcodec/itut35.h b/libavcodec/itut35.h index b8987d0b01..84ea86f3dd 100644 --- a/libavcodec/itut35.h +++ b/libavcodec/itut35.h @@ -30,10 +30,8 @@ // - CN providers #define ITU_T_T35_PROVIDER_CODE_HDR_VIVID 0x0004 // - UK providers -// V-Nova should be 0x5000 according to UK Register of Manufacturer Codes // https://www.cix.co.uk/~bpechey/H221/h221code.htm -// but FFmpeg has been using 0x0050 -#define ITU_T_T35_PROVIDER_CODE_VNOVA 0x0050 +#define ITU_T_T35_PROVIDER_CODE_VNOVA 0x5000 // - US providers #define ITU_T_T35_PROVIDER_CODE_ATSC 0x0031 #define ITU_T_T35_PROVIDER_CODE_DOLBY 0x003B _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
