1
0
Fork 0
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:
stone 2022-12-01 22:07:11 +08:00 committed by GitHub
parent e83fc2388b
commit a4d9e45545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 2 deletions

View file

@ -1065,6 +1065,11 @@ srs_error_t SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandle
}
srs_assert(s != NULL);
bool enabled_cache = _srs_config->get_gop_cache(r->vhost);
int gcmf = _srs_config->get_gop_cache_max_frames(r->vhost);
s->set_cache(enabled_cache);
s->set_gop_cache_max_frames(gcmf);
// create http streaming handler.
if ((err = http_mount(s, r)) != srs_success) {
return srs_error_wrap(err, "http mount");