diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2020-07-20 23:26:15 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-08 11:05:16 +0200 |
commit | 9a471c5437d34cd1e63520b47f50a0fa605a5688 (patch) | |
tree | 70ed5be629cc7644207534f8cd3cd0e0f7e28d53 /libavformat/aacdec.c | |
parent | f6ea2ee005740247a446d28174943b3606721967 (diff) | |
download | ffmpeg-9a471c5437d34cd1e63520b47f50a0fa605a5688.tar.gz |
avformat/rmdec: Fix memleaks upon read_header failure
For both the RealMedia as well as the IVR demuxer (which share the same
context) each AVStream's priv_data contains an AVPacket that might
contain data (even when reading the header) and therefore needs to be
unreferenced. Up until now, this has not always been done:
The RealMedia demuxer didn't do it when allocating a new stream's
priv_data failed although there might be other streams with packets to
unreference. (The reason for this was that until recently rm_read_close()
couldn't handle an AVStream without priv_data, so one had to choose
between a potential crash and a memleak.)
The IVR demuxer meanwhile never ever called read_close so that the data
already contained in packets leaks upon error.
This patch fixes both demuxers by adding the appropriate cleanup code.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/aacdec.c')
0 files changed, 0 insertions, 0 deletions