diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-19 20:22:22 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-19 23:30:00 +0100 |
commit | 18af922c536ad7c89e74a3326c58b6c93254a50f (patch) | |
tree | 5f35903630108c2dce7f90a080a7156f0e7b25a8 /libavcodec/flacenc.c | |
parent | e7c33c92d1eb04669553a89f8e69c64d4d77d9f4 (diff) | |
download | ffmpeg-18af922c536ad7c89e74a3326c58b6c93254a50f.tar.gz |
avformat/iamf: Don't mix ownership and non-ownership pointers
IAMFAudioElement and IAMFMixPresentation currently contain
pointers to independently allocated objects that are sometimes
owned by said structures and sometimes not.
More precisely, upon success the demuxer transfers ownership
of these other objects newly created AVStreamGroups, but it
keeps its pointers. iamf_read_close() therefore always resets
these pointers (because the cleanup code always treats them
as ownership pointers). This leads to memory leaks in case
iamf_read_header() without having attached all of these
objects to stream groups.
The muxer has a similar issue: It also clears these pointers
(pointing to objects owned by stream groups created by the user)
in its deinit function.
This commit fixes this memleak by explicitly adding non-ownership
pointers; this also allows to remove the code to reset the
ownership pointers.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/flacenc.c')
0 files changed, 0 insertions, 0 deletions