fixed sw job buffer missing

This commit is contained in:
jinjunzh 2022-07-13 16:12:15 -04:00
parent b699764bbe
commit 1c6d70f9b3
2 changed files with 4 additions and 1 deletions

View File

@ -245,7 +245,9 @@ qpl_job * SoftwareCodecDeflateQpl::getJobCodecPtr()
uint32_t size = 0;
qpl_get_job_size(qpl_path_software, &size);
sw_job = reinterpret_cast<qpl_job *>((std::make_unique<uint8_t[]>(size)).get());
sw_buffer = std::make_unique<uint8_t[]>(size);
sw_job = reinterpret_cast<qpl_job *>(sw_buffer.get());
// Job initialization
if (auto status = qpl_init_job(qpl_path_software, sw_job); status != QPL_STS_OK)
throw Exception(ErrorCodes::CANNOT_COMPRESS,

View File

@ -65,6 +65,7 @@ public:
private:
qpl_job * sw_job = nullptr;
std::unique_ptr<uint8_t[]> sw_buffer;
qpl_job * getJobCodecPtr();
};