FfmpegEncoder: free codec_ctx in encoder_close (#24967)

free context
old-commit-hash: 0aa9ae21d4068d1e8099ff4256d86a204ec31c1c
This commit is contained in:
Dean Lee
2022-06-27 17:20:13 +08:00
committed by GitHub
parent 1b725b5005
commit ae596241d1
@@ -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;
}