mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Live: Fix bug for gop cache limits. v5.0.99 (#3289)
* bugfix: setting srt bridge to rtmp gop cache limit while SrsMpegtsSrtConn::acquire_publish * setting http_stream gop cache limit while SrsHttpStreamServer::hijack * if gop_cache_max_frames_ == 0, don't enable the got cache max frames limit Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
parent
e83fc2388b
commit
a4d9e45545
5 changed files with 15 additions and 2 deletions
|
@ -659,7 +659,7 @@ srs_error_t SrsGopCache::cache(SrsSharedPtrMessage* shared_msg)
|
|||
gop_cache.push_back(msg->copy());
|
||||
|
||||
// Clear gop cache if exceed the max frames.
|
||||
if (gop_cache.size() > (size_t)gop_cache_max_frames_) {
|
||||
if (gop_cache_max_frames_ > 0 && gop_cache.size() > (size_t)gop_cache_max_frames_) {
|
||||
srs_warn("Gop cache exceed max frames=%d, total=%d, videos=%d, aalvc=%d",
|
||||
gop_cache_max_frames_, (int)gop_cache.size(), cached_video_count, audio_after_last_video_count);
|
||||
clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue