fix resource leak when rotating encoder (#2141)

old-commit-hash: 209e7aa4719fd88bd465936321ea3e6cf5f10658
This commit is contained in:
Dean Lee
2020-09-30 04:53:32 +08:00
committed by GitHub
parent f1163a0b51
commit 9af3c25166
+1
View File
@@ -637,6 +637,7 @@ void encoder_close(EncoderState *s) {
if (s->remuxing) {
av_write_trailer(s->ofmt_ctx);
avcodec_free_context(&s->codec_ctx);
avio_closep(&s->ofmt_ctx->pb);
avformat_free_context(s->ofmt_ctx);
} else {