Skip to content

Commit 7302286

Browse files
authored
fix: 修复GOP cache overflow之后删除的只剩一个gop的问题 (#286)
See: ZLMediaKit/ZLMediaKit#4619
1 parent 2c45bea commit 7302286

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Util/RingBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class _RingStorage {
179179
if (++_size > _max_size) {
180180
// GOP缓存溢出 [AUTO-TRANSLATED:1cd0ddc4]
181181
//GOP cache overflow
182-
while (_data_cache.size() > 1) {
182+
while ((_size > _max_size) && (_data_cache.size() > 1)) {
183183
//先尝试清除老的GOP缓存 [AUTO-TRANSLATED:a01422a1]
184184
//Try to clear the old GOP cache first
185185
popFrontGop();

0 commit comments

Comments
 (0)