merge from srs2

pull/528/head
winlin 9 years ago
commit 97f5bb8b99

@ -105,11 +105,12 @@ namespace internal
return ret; return ret;
} }
disposed = false;
// we set to loop to true for thread to run. // we set to loop to true for thread to run.
loop = true; loop = true;
// wait for cid to ready, for parent thread to get the cid. // wait for cid to ready, for parent thread to get the cid.
while (_cid < 0 && loop) { while (_cid < 0) {
st_usleep(10 * 1000); st_usleep(10 * 1000);
} }
@ -129,6 +130,8 @@ namespace internal
dispose(); dispose();
_cid = -1;
can_run = false;
tid = NULL; tid = NULL;
} }

@ -105,7 +105,7 @@ bool SrsBuffer::empty()
bool SrsBuffer::require(int required_size) bool SrsBuffer::require(int required_size)
{ {
srs_assert(required_size > 0); srs_assert(required_size >= 0);
return required_size <= nb_bytes - (p - bytes); return required_size <= nb_bytes - (p - bytes);
} }

Loading…
Cancel
Save