mirror of
https://github.com/opencv/opencv.git
synced 2025-06-17 23:51:16 +08:00
Report correct open status from Bitstream.
This commit is contained in:
parent
e20250139a
commit
1db23e0f12
@ -3,6 +3,7 @@
|
|||||||
// of this distribution and at http://opencv.org/license.html.
|
// of this distribution and at http://opencv.org/license.html.
|
||||||
|
|
||||||
#include "opencv2/videoio/container_avi.private.hpp"
|
#include "opencv2/videoio/container_avi.private.hpp"
|
||||||
|
#include <opencv2/core/utils/logger.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
@ -645,6 +646,11 @@ bool BitStream::open(const String& filename)
|
|||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
output.open(filename.c_str(), std::ios_base::binary);
|
output.open(filename.c_str(), std::ios_base::binary);
|
||||||
|
if (!output.is_open())
|
||||||
|
{
|
||||||
|
CV_LOG_DEBUG(NULL, cv::format("Failed to open stream for writing to \"%s\"", filename.c_str()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
m_current = m_start;
|
m_current = m_start;
|
||||||
m_pos = 0;
|
m_pos = 0;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user