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>
This commit is contained in:
parent
0b02123cc8
commit
298c3bd2f4
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user