Merge pull request #5502 from AlexanderStohr:file-handle-volatile-fix
This commit is contained in:
commit
c1545c6f2a
@ -368,7 +368,7 @@ bool PngEncoder::write( const Mat& img, const std::vector<int>& params )
|
||||
{
|
||||
f = fopen( m_filename.c_str(), "wb" );
|
||||
if( f )
|
||||
png_init_io( png_ptr, f );
|
||||
png_init_io( png_ptr, (png_FILE_p)f );
|
||||
}
|
||||
|
||||
int compression_level = -1; // Invalid value to allow setting 0-9 as valid
|
||||
@ -437,7 +437,7 @@ bool PngEncoder::write( const Mat& img, const std::vector<int>& params )
|
||||
}
|
||||
|
||||
png_destroy_write_struct( &png_ptr, &info_ptr );
|
||||
if(f) fclose( f );
|
||||
if(f) fclose( (FILE*)f );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -586,6 +586,7 @@ bool CvCapture_FFMPEG::open( const char* _filename )
|
||||
if (err < 0)
|
||||
{
|
||||
CV_WARN("Error opening file");
|
||||
CV_WARN(_filename);
|
||||
goto exit_func;
|
||||
}
|
||||
err =
|
||||
|
@ -601,6 +601,8 @@ bool CvCapture_GStreamer::open( int type, const char* filename )
|
||||
else
|
||||
{
|
||||
CV_WARN("GStreamer: Error opening file\n");
|
||||
CV_WARN(filename);
|
||||
CV_WARN(uri);
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user