shithub: libvpx

Download patch

ref: 6a1c052f3fe60f76ee8e15343ff23fbd4be3c1e2
parent: 250fc1f6a211ed0943125d9b94cb9b3bcf813979
parent: 4851b99bf181f5c0667a7a97d3685773126f7b51
author: Deb Mukherjee <debargha@google.com>
date: Fri Aug 15 10:04:18 EDT 2014

Merge "Removes fileno check to prevent valgrind error"

--- a/test/video_source.h
+++ b/test/video_source.h
@@ -92,12 +92,7 @@
  protected:
   void CloseFile() {
     if (file_) {
-      // Close if file pointer is associated with an open file
-#if defined(_WIN32)
-      if (file_->_ptr != NULL) fclose(file_);
-#else
-      if (fileno(file_) != -1) fclose(file_);
-#endif
+      fclose(file_);
       file_ = NULL;
     }
   }
--- a/test/y4m_test.cc
+++ b/test/y4m_test.cc
@@ -141,11 +141,11 @@
   Y4mVideoWriteTest() {}
 
   virtual ~Y4mVideoWriteTest() {
-    CloseSource();
     delete tmpfile_;
+    input_file_ = NULL;
   }
 
-  virtual void ReplaceInputFile(FILE *input_file) {
+  void ReplaceInputFile(FILE *input_file) {
     CloseSource();
     frame_ = 0;
     input_file_ = input_file;
--