From 657185145236c12eb0fcf104b4712d8bb88efe16 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期六, 19 十月 2019 11:04:27 +0800 Subject: [PATCH] bug fix --- csrc/worker/rec.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/csrc/worker/rec.cpp b/csrc/worker/rec.cpp index 14069ae..49c3a97 100644 --- a/csrc/worker/rec.cpp +++ b/csrc/worker/rec.cpp @@ -196,7 +196,11 @@ void rec::SetRecMinCacheTime(const int min){ // 鐢变簬鏁翠釜娴佺▼鑰楁椂,琛ュ伩time_offset_,鍥犱负鏄渶灏忕殑涓�鍗�,鍙湁time_offset_/2 - min_cache_len_ = (min + time_offset_) * recRef_->getFPS(); + int fps = 25; + if (recRef_){ + fps = recRef_->getFPS(); + } + min_cache_len_ = (min + time_offset_) * fps; } int rec::shrinkCache(){ -- Gitblit v1.8.0