From ab5497df1556a2099038cdf7bde5e40608c6796e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Tue, 4 Dec 2012 23:56:00 +0100 Subject: [PATCH] lavfi/subtitles: 10l close codec before format. Fix invalid memory accesses. --- libavfilter/vf_ass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_ass.c b/libavfilter/vf_ass.c index 3f0d3a994c..ade1b37374 100644 --- a/libavfilter/vf_ass.c +++ b/libavfilter/vf_ass.c @@ -332,10 +332,10 @@ static av_cold int init_subtitles(AVFilterContext *ctx, const char *args) } end: - if (fmt) - avformat_close_input(&fmt); if (dec_ctx) avcodec_close(dec_ctx); + if (fmt) + avformat_close_input(&fmt); return ret; }