diff --git a/libavformat/utils.c b/libavformat/utils.c index a9f8cf6f84..ff55fc8d97 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4199,8 +4199,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); }