avutil: hdr_dynamic_metadata: fix error code

When s is NULL in av_dynamic_hdr_smpte2094_app5_from_t35, that's not an
allocation error but just invalid API usage. If there is any allocation
failure beforehand that would lead to this, the caller has to check it,
like is already done in all usages of this function in FFmpeg itself.
This commit is contained in:
Marvin Scholz
2026-05-12 17:18:38 +02:00
parent 37ff8fad47
commit 4851060ccd
+1 -1
View File
@@ -438,7 +438,7 @@ int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5 *s, const u
size_t padded_size = size + AV_INPUT_BUFFER_PADDING_SIZE;
if (!s)
return AVERROR(ENOMEM);
return AVERROR(EINVAL);
uint8_t *padded_data = av_mallocz(padded_size);
if (!padded_data)