diff --git a/libavutil/hdr_dynamic_metadata.c b/libavutil/hdr_dynamic_metadata.c index 9c89625421..4c9ac25970 100644 --- a/libavutil/hdr_dynamic_metadata.c +++ b/libavutil/hdr_dynamic_metadata.c @@ -64,7 +64,7 @@ int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, int ret; if (!s) - return AVERROR(ENOMEM); + return AVERROR(EINVAL); if (size > AV_HDR_PLUS_MAX_PAYLOAD_SIZE) return AVERROR(EINVAL); diff --git a/libavutil/hdr_dynamic_metadata.h b/libavutil/hdr_dynamic_metadata.h index a051ac7471..5881c35220 100644 --- a/libavutil/hdr_dynamic_metadata.h +++ b/libavutil/hdr_dynamic_metadata.h @@ -248,7 +248,11 @@ typedef struct AVDynamicHDRPlus { /** * Application version in the application defining document in ST-2094 - * suite. The value shall be set to 0. + * suite. CTA-861-H sets this to 1 for the HDR10+ payload carried in a + * Rec. ITU-T T.35 message. + * + * av_dynamic_hdr_plus_from_t35() sets this field from the parsed payload. + * av_dynamic_hdr_plus_to_t35() ignores it and always writes 1. */ uint8_t application_version;