fix memory leak in encoder_close (#1366)

* fix memory leak in encoder_close

* add &
This commit is contained in:
Dean Lee
2020-04-16 09:06:22 +08:00
committed by GitHub
parent a4ad9d1f46
commit 3b3eebb137
+1
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);