]> granicus.if.org Git - libvpx/commitdiff
Close out file in EndEncode()
authorangiebird <angiebird@google.com>
Mon, 10 Aug 2020 22:37:24 +0000 (15:37 -0700)
committerangiebird <angiebird@google.com>
Mon, 10 Aug 2020 23:13:16 +0000 (16:13 -0700)
Change-Id: Ib6549f954ce6d5d966eef09a119b46f0cc2f54f7

vp9/simple_encode.cc

index 46b25d1fdf82e08f9273ea25b36aedb76540db0f..ba076fd586c086beaf62d05951795dfaf441160f 100644 (file)
@@ -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) {