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
|
@ -367,6 +367,13 @@ srs_error_t SrsMpegtsSrtConn::acquire_publish()
|
|||
return srs_error_wrap(err, "create source");
|
||||
}
|
||||
|
||||
srs_assert(live_source != NULL);
|
||||
|
||||
bool enabled_cache = _srs_config->get_gop_cache(req_->vhost);
|
||||
int gcmf = _srs_config->get_gop_cache_max_frames(req_->vhost);
|
||||
live_source->set_cache(enabled_cache);
|
||||
live_source->set_gop_cache_max_frames(gcmf);
|
||||
|
||||
SrsRtmpFromSrtBridge *bridger = new SrsRtmpFromSrtBridge(live_source);
|
||||
if ((err = bridger->initialize(req_)) != srs_success) {
|
||||
srs_freep(bridger);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue