Commit ee17fdff 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 eadb52d4
......@@ -4046,8 +4046,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