aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorSteven Siloti <ssiloti@bittorrent.com>2017-07-18 11:26:39 -0700
committerMichael Niedermayer <michael@niedermayer.cc>2017-09-10 01:33:28 +0200
commitfd871e24e65b2d3d91b060b5e878f37c9ee5cdff (patch)
tree14485e728e8f9cd8e0a955f13222c0ee4e7b73bb /libavformat/utils.c
parent8aa32a8d5c6ba5611cbb4c5329d1c6e8441d64e7 (diff)
downloadffmpeg-fd871e24e65b2d3d91b060b5e878f37c9ee5cdff.tar.gz
avformat/utils: fix memory leak in avformat_free_context
The pointer to the packet queue is stored in the internal structure so the queue needs to be flushed before internal is freed. Signed-off-by: Steven Siloti <ssiloti@bittorrent.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 949debd1d1df3a96315b3a3083831162845c1188) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a9f8cf6f84..ff55fc8d97 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -4199,8 +4199,8 @@ void avformat_free_context(AVFormatContext *s)
av_dict_free(&s->metadata);
av_dict_free(&s->internal->id3v2_meta);
av_freep(&s->streams);
- av_freep(&s->internal);
flush_packet_queue(s);
+ av_freep(&s->internal);
av_free(s);
}