调整mips64导致崩溃问题

This commit is contained in:
luoliangyi 2022-05-05 18:04:20 +08:00
parent 1d5b8753af
commit b2d6ff3700
12 changed files with 16 additions and 9 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -51,7 +51,13 @@ G200Decode::G200Decode(std::shared_ptr<std::vector<char>> buff,bool is_duplex,bo
G400Decode::G400Decode(std::shared_ptr<std::vector<char>> buff,bool i)
{
printf("G400 :buff->size()=%d\r\n",buff->size());
/*std::shared_ptr<std::vector<char>> buf;
buf.reset(new std::vector<char>);
auto bytes = buff->size();
buf->resize(bytes);
memcpy(buf->data(), buff->data(), bytes);
m_buffs.push_back(buf);*/
m_buffs.push_back(buff);
printf("G400 :buff->size()=%d\r\n",buff->size());
}

View File

@ -80,7 +80,6 @@ namespace hg_imgproc
{
buffer_.reset(new std::vector<char >(*buff));
mats_.clear();
return HG_ERR_OK;
}
int load_file(const char* path_file)
@ -129,9 +128,11 @@ namespace hg_imgproc
if(buffs.empty())
return -1;
/////cmake当中进行定义 mips64 //在mips64下使用reset会导致崩溃
#ifndef mips64
buffer_.reset();
#endif
//#ifndef mips64
//printf("\n buffer_ reset");
buffer_.reset(new std::vector<char >());
//printf("\n buffer_ reset");
//#endif
for (auto& buf : buffs) {
cv::ImreadModes rmc = param_.channels > 1 ? cv::IMREAD_COLOR : cv::IMREAD_GRAYSCALE;
@ -182,9 +183,9 @@ namespace hg_imgproc
back.release();
front.release();
}
#ifndef mips64
buffer_.reset();
#endif
//#ifndef mips64
buffer_.reset(new std::vector<char >());
//#endif
}
catch (const std::exception& e)
{