fix memory leak in encoder_close (#1366)

* fix memory leak in encoder_close

* add &
old-commit-hash: 3b3eebb1373290816f2c49d221883420aabe4d8f
This commit is contained in:
Dean Lee
2020-04-16 09:06:22 +08:00
committed by GitHub
parent cdda637936
commit 68578673ff

View File

@@ -635,6 +635,7 @@ void encoder_close(EncoderState *s) {
if (s->remuxing) {
av_write_trailer(s->ofmt_ctx);
avio_closep(&s->ofmt_ctx->pb);
avcodec_free_context(&s->codec_ctx);
avformat_free_context(s->ofmt_ctx);
} else {
fclose(s->of);