Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
c1545c6f
Commit
c1545c6f
authored
Oct 14, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5502 from AlexanderStohr:file-handle-volatile-fix
parents
466a98f7
0098c4b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
grfmt_png.cpp
modules/imgcodecs/src/grfmt_png.cpp
+2
-2
cap_ffmpeg_impl.hpp
modules/videoio/src/cap_ffmpeg_impl.hpp
+1
-0
cap_gstreamer.cpp
modules/videoio/src/cap_gstreamer.cpp
+2
-0
No files found.
modules/imgcodecs/src/grfmt_png.cpp
View file @
c1545c6f
...
@@ -368,7 +368,7 @@ bool PngEncoder::write( const Mat& img, const std::vector<int>& params )
...
@@ -368,7 +368,7 @@ bool PngEncoder::write( const Mat& img, const std::vector<int>& params )
{
{
f
=
fopen
(
m_filename
.
c_str
(),
"wb"
);
f
=
fopen
(
m_filename
.
c_str
(),
"wb"
);
if
(
f
)
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
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 )
...
@@ -437,7 +437,7 @@ bool PngEncoder::write( const Mat& img, const std::vector<int>& params )
}
}
png_destroy_write_struct
(
&
png_ptr
,
&
info_ptr
);
png_destroy_write_struct
(
&
png_ptr
,
&
info_ptr
);
if
(
f
)
fclose
(
f
);
if
(
f
)
fclose
(
(
FILE
*
)
f
);
return
result
;
return
result
;
}
}
...
...
modules/videoio/src/cap_ffmpeg_impl.hpp
View file @
c1545c6f
...
@@ -586,6 +586,7 @@ bool CvCapture_FFMPEG::open( const char* _filename )
...
@@ -586,6 +586,7 @@ bool CvCapture_FFMPEG::open( const char* _filename )
if
(
err
<
0
)
if
(
err
<
0
)
{
{
CV_WARN
(
"Error opening file"
);
CV_WARN
(
"Error opening file"
);
CV_WARN
(
_filename
);
goto
exit_func
;
goto
exit_func
;
}
}
err
=
err
=
...
...
modules/videoio/src/cap_gstreamer.cpp
View file @
c1545c6f
...
@@ -601,6 +601,8 @@ bool CvCapture_GStreamer::open( int type, const char* filename )
...
@@ -601,6 +601,8 @@ bool CvCapture_GStreamer::open( int type, const char* filename )
else
else
{
{
CV_WARN
(
"GStreamer: Error opening file
\n
"
);
CV_WARN
(
"GStreamer: Error opening file
\n
"
);
CV_WARN
(
filename
);
CV_WARN
(
uri
);
close
();
close
();
return
false
;
return
false
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment