Removes fileno check to prevent valgrind error
Explicitly makes the fileptr null when close source is called on a temporary file. This avoids a valgrind error. Change-Id: I9c364290eeb6842fde946dd9bf817814c7178aaa
This commit is contained in:
parent
54f8cb78c6
commit
4851b99bf1
@ -92,12 +92,7 @@ class TempOutFile {
|
|||||||
protected:
|
protected:
|
||||||
void CloseFile() {
|
void CloseFile() {
|
||||||
if (file_) {
|
if (file_) {
|
||||||
// Close if file pointer is associated with an open file
|
fclose(file_);
|
||||||
#if defined(_WIN32)
|
|
||||||
if (file_->_ptr != NULL) fclose(file_);
|
|
||||||
#else
|
|
||||||
if (fileno(file_) != -1) fclose(file_);
|
|
||||||
#endif
|
|
||||||
file_ = NULL;
|
file_ = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,11 +141,11 @@ class Y4mVideoWriteTest
|
|||||||
Y4mVideoWriteTest() {}
|
Y4mVideoWriteTest() {}
|
||||||
|
|
||||||
virtual ~Y4mVideoWriteTest() {
|
virtual ~Y4mVideoWriteTest() {
|
||||||
CloseSource();
|
|
||||||
delete tmpfile_;
|
delete tmpfile_;
|
||||||
|
input_file_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ReplaceInputFile(FILE *input_file) {
|
void ReplaceInputFile(FILE *input_file) {
|
||||||
CloseSource();
|
CloseSource();
|
||||||
frame_ = 0;
|
frame_ = 0;
|
||||||
input_file_ = input_file;
|
input_file_ = input_file;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user