fix resource leak when rotating encoder (#2141)

pull/2248/head
Dean Lee 2020-09-30 04:53:32 +08:00 committed by GitHub
parent be7cc63e3d
commit 209e7aa471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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 {