Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-09-16 18:54:59 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-01 22:39:33 +0300
commitd1fe26f2b75088bf29b8ed27ad43146e1666e38e (patch)
tree54b045bbe97d82086a0dc8142b114617be232203 /libavformat/mov.c
parent6b0276f05ee0ee7c7cb76d381fe3e27cae806205 (diff)
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>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index da2164e408..da0d90733f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7832,8 +7832,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;
}