1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix dvr mem leak, free msg when not use it.

This commit is contained in:
winlin 2014-04-16 15:58:06 +08:00
parent 36c2c37b42
commit 0c91fa6bed
5 changed files with 27 additions and 0 deletions

View file

@ -84,6 +84,7 @@ class SrsThread
{
private:
st_thread_t tid;
int _cid;
bool loop;
private:
ISrsThreadHandler* handler;
@ -97,6 +98,12 @@ public:
SrsThread(ISrsThreadHandler* thread_handler, int64_t interval_us);
virtual ~SrsThread();
public:
/**
* get the context id. @see: ISrsThreadContext.get_id().
* used for parent thread to get the id.
* @remark when start thread, parent thread will block and wait for this id ready.
*/
virtual int cid();
/**
* start the thread, invoke the cycle of handler util
* user stop the thread.