mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user