diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 5c3cffbe80..c7c82b75c6 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -478,6 +478,7 @@ end: av_dict_free(&codec_opts); if (dec_ctx) avcodec_close(dec_ctx); + avcodec_free_context(&dec_ctx); if (fmt) avformat_close_input(&fmt); return ret;