summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-05-27 09:30:46 +0200
committerAnton Khirnov <anton@khirnov.net>2020-06-10 11:31:16 +0200
commit0d6b4351c64664d8c2f56d0ddb5e38b800ed8751 (patch)
tree8e90e756ec588f3a34b740284f5ec8da315bd5c8 /libavfilter
parent9dfb19baeb86a8bb02c53a441682c6e9a6e104cc (diff)
Remove unnecessary use of avcodec_close().
Replace it with avcodec_free_context() or drop it completely as appropriate.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_subtitles.c1
-rw-r--r--libavfilter/vf_uspp.c6
2 files changed, 2 insertions, 5 deletions
diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c
index a3b4029af4..1bd42391e0 100644
--- a/libavfilter/vf_subtitles.c
+++ b/libavfilter/vf_subtitles.c
@@ -478,7 +478,6 @@ static av_cold int init_subtitles(AVFilterContext *ctx)
end:
av_dict_free(&codec_opts);
- avcodec_close(dec_ctx);
avcodec_free_context(&dec_ctx);
avformat_close_input(&fmt);
return ret;
diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c
index da4029f4b2..f6fb193433 100644
--- a/libavfilter/vf_uspp.c
+++ b/libavfilter/vf_uspp.c
@@ -468,10 +468,8 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&uspp->src[i]);
}
- for (i = 0; i < (1 << uspp->log2_count); i++) {
- avcodec_close(uspp->avctx_enc[i]);
- av_freep(&uspp->avctx_enc[i]);
- }
+ for (i = 0; i < (1 << uspp->log2_count); i++)
+ avcodec_free_context(&uspp->avctx_enc[i]);
av_freep(&uspp->non_b_qp_table);
av_freep(&uspp->outbuf);