Commit 298c3bd2 authored by Steven Siloti's avatar Steven Siloti Committed by Michael Niedermayer

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: 's avatarSteven Siloti <ssiloti@bittorrent.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 949debd1)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0b02123c
......@@ -3554,8 +3554,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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment