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:
authorSteven Siloti <ssiloti@bittorrent.com>2017-07-18 21:26:39 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-06 00:25:05 +0300
commitf0f45d84045307eeca5d0ec950ddcea702c68997 (patch)
tree489a259a180e581db193f6e3fc45b1ac6c275f1f
parent9d0eb81cb85cb061955153f0698fc12f0d89cafc (diff)
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>
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a88d9598dc..b2a838bef4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3723,8 +3723,8 @@ void avformat_free_context(AVFormatContext *s)
av_freep(&s->chapters);
av_dict_free(&s->metadata);
av_freep(&s->streams);
- av_freep(&s->internal);
flush_packet_queue(s);
+ av_freep(&s->internal);
av_free(s);
}