Commit 641ca6ba827173229278c5c4a53bd6cb912ac294

Authored by Hu Chunming
1 parent fdaddb92

修复任务创建失败时的显存泄漏

src/decoder/dvpp/DvppDecoder.cpp
... ... @@ -328,13 +328,13 @@ int DvppDecoder::getVdecType(int videoType, int profile)
328 328 aclError ret = aclrtSetDevice(m_dvpp_deviceId);
329 329 if(ret != ACL_ERROR_NONE){
330 330 LOG_ERROR("[{}]-aclrtSetDevice failed !", m_dec_name);
331   - return false;
  331 + break;
332 332 }
333 333  
334 334 ret = aclrtCreateContext(&m_context, m_dvpp_deviceId);
335 335 if (ret != ACL_ERROR_NONE) {
336 336 LOG_ERROR("[{}]-aclrtCreateContext failed !", m_dec_name);
337   - return false;
  337 + break;
338 338 }
339 339  
340 340 // DvppSourceManager 创建时包含 aclInit,析构时包含 aclFinalize
... ... @@ -342,7 +342,7 @@ int DvppDecoder::getVdecType(int videoType, int profile)
342 342 m_dvpp_channel = pSrcMgr->getChannel(m_dvpp_deviceId);
343 343 if(m_dvpp_channel < 0){
344 344 LOG_ERROR("[{}]-该设备channel已经用完了!", m_dec_name);
345   - return false;
  345 + break;
346 346 }
347 347  
348 348 m_vpcUtils.init(m_dvpp_deviceId);
... ...
src/decoder/dvpp/DvppStreamDecoder.cpp
... ... @@ -55,7 +55,7 @@ DvppStreamDecoder::~DvppStreamDecoder()
55 55 {
56 56 Close();
57 57  
58   - LOG_DEBUG("[{}]- ~DvppDecoder() in_count:{} out_count:{}", m_dec_name, m_in_count, m_out_count);
  58 + LOG_DEBUG("[{}]- ~DvppStreamDecoder() in_count:{} out_count:{}", m_dec_name, m_in_count, m_out_count);
59 59 }
60 60  
61 61 bool DvppStreamDecoder::Init(FFDecConfig cfg) {
... ...