Commit 7ae675fad5fba702f790942ad2ff8574555edc7f
1 parent
380f4967
代码执行发现解码过慢时视频流也会导致占用显存过大
Showing
1 changed file
with
1 additions
and
1 deletions
src/decoder/dvpp/DvppDecoder.cpp
@@ -519,7 +519,7 @@ void DvppDecoder::read_thread() { | @@ -519,7 +519,7 @@ void DvppDecoder::read_thread() { | ||
519 | #endif | 519 | #endif |
520 | nSended = sendPkt(vdecChannelDesc, pkt, frame_nb); | 520 | nSended = sendPkt(vdecChannelDesc, pkt, frame_nb); |
521 | 521 | ||
522 | - if(!m_bReal && frame_nb > 20 && m_avg_decode_time > 0) | 522 | + if(frame_nb > 20 && m_avg_decode_time > 0) |
523 | { | 523 | { |
524 | // 针对文件,根据解码时间做延时,避免占用过多显存 | 524 | // 针对文件,根据解码时间做延时,避免占用过多显存 |
525 | std::this_thread::sleep_for(std::chrono::milliseconds(m_avg_decode_time)); | 525 | std::this_thread::sleep_for(std::chrono::milliseconds(m_avg_decode_time)); |