Commit 380f49678ce0aa4a8f95c0d6012135943dfd163b

Authored by Hu Chunming
1 parent 8dc2e224

修正延时时间

src/decoder/dvpp/DvppDecoder.cpp
... ... @@ -522,7 +522,7 @@ void DvppDecoder::read_thread() {
522 522 if(!m_bReal && frame_nb > 20 && m_avg_decode_time > 0)
523 523 {
524 524 // 针对文件,根据解码时间做延时,避免占用过多显存
525   - std::this_thread::sleep_for(std::chrono::milliseconds(10));
  525 + std::this_thread::sleep_for(std::chrono::milliseconds(m_avg_decode_time));
526 526 }
527 527 }
528 528  
... ... @@ -710,7 +710,7 @@ void DvppDecoder::doVdppVdecCallBack(acldvppStreamDesc *input, acldvppPicDesc *o
710 710 {
711 711 m_decode_20_time -= m_avg_decode_time*20; // 减去等待用的时间就是实际解码用时
712 712 m_avg_decode_time = m_decode_20_time / 20;
713   - // LOG_INFO("[{}]- m_avg_decode_time: {}", m_dec_name, m_avg_decode_time);
  713 + LOG_INFO("[{}]- m_avg_decode_time: {}", m_dec_name, m_avg_decode_time);
714 714 if (m_avg_decode_time <= 0) {
715 715 m_avg_decode_time = 1;
716 716 }
... ...