winlin

dispose the gop cache

... ... @@ -523,6 +523,8 @@ void SrsServer::destroy()
ingester->dispose();
#endif
SrsSource::dispose_all();
#ifdef SRS_AUTO_HTTP_API
srs_freep(http_api_mux);
#endif
... ...
... ... @@ -583,6 +583,11 @@ SrsGopCache::~SrsGopCache()
clear();
}
void SrsGopCache::dispose()
{
clear();
}
void SrsGopCache::set(bool enabled)
{
enable_gop_cache = enabled;
... ... @@ -955,6 +960,8 @@ void SrsSource::dispose()
#ifdef SRS_AUTO_HLS
hls->dispose();
#endif
gop_cache->dispose();
}
int SrsSource::cycle()
... ...
... ... @@ -310,6 +310,10 @@ public:
virtual ~SrsGopCache();
public:
/**
* cleanup when system quit.
*/
virtual void dispose();
/**
* to enable or disable the gop cache.
*/
virtual void set(bool enabled);
... ...