You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 22:24:04 +02:00
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 949debd1d1
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
693db350dd
commit
a371850d58
@ -3778,8 +3778,8 @@ void avformat_free_context(AVFormatContext *s)
|
|||||||
av_freep(&s->chapters);
|
av_freep(&s->chapters);
|
||||||
av_dict_free(&s->metadata);
|
av_dict_free(&s->metadata);
|
||||||
av_freep(&s->streams);
|
av_freep(&s->streams);
|
||||||
av_freep(&s->internal);
|
|
||||||
flush_packet_queue(s);
|
flush_packet_queue(s);
|
||||||
|
av_freep(&s->internal);
|
||||||
av_free(s);
|
av_free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user