mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
avformat/iamfdec: free superfluous objects
The AVIAMFAudioElement and AVIAMFMixPresentation that are ultimately used are allocated by ff_iamfdec_read_descriptors(). Fixes some memory leaks reported by Valgrind. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
a47072d643
commit
b6af126c72
@ -404,6 +404,7 @@ static int iamf_read_header(AVFormatContext *s)
|
||||
if (!stg)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
av_iamf_audio_element_free(&stg->params.iamf_audio_element);
|
||||
stg->id = audio_element->audio_element_id;
|
||||
stg->params.iamf_audio_element = audio_element->element;
|
||||
|
||||
@ -435,6 +436,7 @@ static int iamf_read_header(AVFormatContext *s)
|
||||
if (!stg)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
av_iamf_mix_presentation_free(&stg->params.iamf_mix_presentation);
|
||||
stg->id = mix_presentation->mix_presentation_id;
|
||||
stg->params.iamf_mix_presentation = mix_presentation->mix;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user