From 7370cecd8929141adb8140b924d3dd8ac1887d36 Mon Sep 17 00:00:00 2001 From: angiebird Date: Mon, 10 Aug 2020 15:37:24 -0700 Subject: [PATCH] Close out file in EndEncode() Change-Id: Ib6549f954ce6d5d966eef09a119b46f0cc2f54f7 --- vp9/simple_encode.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vp9/simple_encode.cc b/vp9/simple_encode.cc index 46b25d1fd..ba076fd58 100644 --- a/vp9/simple_encode.cc +++ b/vp9/simple_encode.cc @@ -959,6 +959,10 @@ void SimpleEncode::EndEncode() { impl_ptr_->cpi = nullptr; vpx_img_free(&impl_ptr_->tmp_img); rewind(in_file_); + if (out_file_ != nullptr) { + fclose(out_file_); + out_file_ = nullptr; + } } void SimpleEncode::UpdateKeyFrameGroup(int key_frame_show_index) { -- 2.40.0