[FFmpeg-cvslog] avformat/mov: Fix memleak
Andreas Rheinhardt
git at videolan.org
Tue Sep 17 16:01:50 EEST 2019
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Mon Sep 16 17:54:59 2019 +0200| [34bd293b014efc816bd7aab068d7f9e4a6d3011a] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=34bd293b014efc816bd7aab068d7f9e4a6d3011a
---
libavformat/mov.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 675b915906..cd3f5bffcf 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7843,8 +7843,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;
}
More information about the ffmpeg-cvslog
mailing list