avformat/iamf_writer: Remove nonsense check

Checking whether a pointer to an element of an array is NULL
makes no sense, as the pointer addition involved in getting
the address would be undefined behaviour already if the array
were NULL.
In this case the array allocation has already been checked
a few lines before.
Fixes Coverity issue #1559548.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-02-19 19:13:11 +01:00
parent 94fadd335b
commit 840f192540
1 changed files with 0 additions and 2 deletions

View File

@ -251,8 +251,6 @@ int ff_iamf_add_audio_element(IAMFContext *iamf, const AVStreamGroup *stg, void
int nb_channels = iamf_audio_element->layers[i]->ch_layout.nb_channels;
IAMFLayer *layer = &audio_element->layers[i];
if (!layer)
return AVERROR(ENOMEM);
memset(layer, 0, sizeof(*layer));
if (i)