Fix NV12 crash issue when recreate camera object
This commit is contained in:
@@ -118,7 +118,7 @@ namespace ANSCENTER {
|
||||
}
|
||||
|
||||
std::vector<ANSCENTER::OCRObject> ANSOCR::RunInference(const cv::Mat& input, const std::string& cameraId) {
|
||||
std::lock_guard<std::recursive_mutex> lock(_mutex);
|
||||
// No coarse _mutex — ppOCR->Predict() / engine has its own internal lock
|
||||
std::vector<ANSCENTER::OCRObject> OCRObjects;
|
||||
OCRObjects.clear();
|
||||
if (!_licenseValid) {
|
||||
@@ -177,7 +177,7 @@ namespace ANSCENTER {
|
||||
|
||||
|
||||
std::vector<ANSCENTER::OCRObject> ANSOCR::RunInference(const cv::Mat& input, const std::vector<cv::Rect>& Bbox) {
|
||||
std::lock_guard<std::recursive_mutex> lock(_mutex);
|
||||
// No coarse _mutex — ppOCR->Predict() / engine has its own internal lock
|
||||
std::vector<ANSCENTER::OCRObject> OCRObjects;
|
||||
OCRObjects.clear();
|
||||
if (!_licenseValid) {
|
||||
@@ -271,7 +271,7 @@ namespace ANSCENTER {
|
||||
|
||||
|
||||
std::vector<ANSCENTER::OCRObject> ANSOCR::RunInference(const cv::Mat& input, const std::vector<cv::Rect>& Bbox, const std::string& cameraId) {
|
||||
std::lock_guard<std::recursive_mutex> lock(_mutex);
|
||||
// No coarse _mutex — ppOCR->Predict() / engine has its own internal lock
|
||||
std::vector<ANSCENTER::OCRObject> OCRObjects;
|
||||
OCRObjects.clear();
|
||||
if (!_licenseValid) {
|
||||
|
||||
Reference in New Issue
Block a user