This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new bc4cbbb85f avutil/hdr_dynamic_metadata: fix from_t35 NULL return and
version doc
bc4cbbb85f is described below
commit bc4cbbb85f16ff6eadd6548bafa0d6a1da0c0d06
Author: Marcos Ashton Iglesias <[email protected]>
AuthorDate: Tue Aug 4 22:15:17 2026 +0100
Commit: michaelni <[email protected]>
CommitDate: Sat Aug 15 01:08:24 2026 +0000
avutil/hdr_dynamic_metadata: fix from_t35 NULL return and version doc
av_dynamic_hdr_plus_from_t35() returned AVERROR(ENOMEM) when passed a
NULL AVDynamicHDRPlus. A NULL output struct is invalid API usage by the
caller, not an allocation failure, and nothing is allocated on that
path. av_dynamic_hdr_smpte2094_app5_from_t35() already returns
AVERROR(EINVAL) for the same condition; make the two parsers agree.
The documentation for AVDynamicHDRPlus.application_version said the
value shall be set to 0, which contradicts both sides of the
implementation: av_dynamic_hdr_plus_to_t35() ignores the field and
always writes 1, the value CTA-861-H specifies for the HDR10+ payload,
and av_dynamic_hdr_plus_from_t35() sets the field from the parsed
payload rather than validating it against 0. No FFmpeg code assigns
this field, so document the contract the implementation provides.
Signed-off-by: marcos ashton <[email protected]>
---
libavutil/hdr_dynamic_metadata.c | 2 +-
libavutil/hdr_dynamic_metadata.h | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
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;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]