Commit 949debd1 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>
parent 013ec23c
......@@ -4333,8 +4333,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);
}
......
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