mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
dispose the gop cache
This commit is contained in:
parent
beb0431746
commit
811ef4bcf6
3 changed files with 13 additions and 0 deletions
|
@ -523,6 +523,8 @@ void SrsServer::destroy()
|
||||||
ingester->dispose();
|
ingester->dispose();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SrsSource::dispose_all();
|
||||||
|
|
||||||
#ifdef SRS_AUTO_HTTP_API
|
#ifdef SRS_AUTO_HTTP_API
|
||||||
srs_freep(http_api_mux);
|
srs_freep(http_api_mux);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -583,6 +583,11 @@ SrsGopCache::~SrsGopCache()
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SrsGopCache::dispose()
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
void SrsGopCache::set(bool enabled)
|
void SrsGopCache::set(bool enabled)
|
||||||
{
|
{
|
||||||
enable_gop_cache = enabled;
|
enable_gop_cache = enabled;
|
||||||
|
@ -955,6 +960,8 @@ void SrsSource::dispose()
|
||||||
#ifdef SRS_AUTO_HLS
|
#ifdef SRS_AUTO_HLS
|
||||||
hls->dispose();
|
hls->dispose();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gop_cache->dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
int SrsSource::cycle()
|
int SrsSource::cycle()
|
||||||
|
|
|
@ -309,6 +309,10 @@ public:
|
||||||
SrsGopCache();
|
SrsGopCache();
|
||||||
virtual ~SrsGopCache();
|
virtual ~SrsGopCache();
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* cleanup when system quit.
|
||||||
|
*/
|
||||||
|
virtual void dispose();
|
||||||
/**
|
/**
|
||||||
* to enable or disable the gop cache.
|
* to enable or disable the gop cache.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue