diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-09-16 17:54:59 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-01 22:19:06 +0200 |
commit | 8ee6b52db0e68f897d9829e51407fb35a90dfe48 (patch) | |
tree | 8211e13b97a090882f0e60e2b9b173bd164440d3 | |
parent | 9a3edef421ad245d450b57d6ce9dd8fd2be6920a (diff) | |
download | ffmpeg-8ee6b52db0e68f897d9829e51407fb35a90dfe48.tar.gz |
avformat/mov: Fix memleak
When the mov/mp4 demuxer encounters an error during decrypting a packet,
it returns the error, yet doesn't free the packet, so that the packet
leaks. This has been fixed in this commit.
Fixes the memleaks from ticket #8150.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 34bd293b014efc816bd7aab068d7f9e4a6d3011a)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 4de31135b4..9467370cce 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7819,8 +7819,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) aax_filter(pkt->data, pkt->size, mov); ret = cenc_filter(mov, st, sc, pkt, current_index); - if (ret < 0) + if (ret < 0) { + av_packet_unref(pkt); return ret; + } return 0; } |