FfmpegEncoder: free codec_ctx in encoder_close (#24967)

free context
This commit is contained in:
Dean Lee
2022-06-27 17:20:13 +08:00
committed by GitHub
parent 748bbac344
commit 0aa9ae21d4
@@ -68,7 +68,9 @@ void FfmpegEncoder::encoder_open(const char* path) {
void FfmpegEncoder::encoder_close() {
if (!is_open) return;
writer_close();
avcodec_free_context(&codec_ctx);
is_open = false;
}