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

refine code:

优化 判断重复推流 及 推流流程
This commit is contained in:
zhengfl 2015-07-09 15:45:55 +08:00
parent f6a2cea716
commit 2263f2a610
4 changed files with 59 additions and 143 deletions

20
trunk/src/app/srs_app_source.cpp Normal file → Executable file
View file

@ -1958,26 +1958,6 @@ int SrsSource::on_aggregate(SrsCommonMessage* msg)
return ret;
}
int SrsSource::acquire_publish()
{
int ret = ERROR_SUCCESS;
if (!_can_publish) {
ret = ERROR_SYSTEM_STREAM_BUSY;
srs_warn("publish lock stream failed, ret=%d", ret);
return ret;
}
_can_publish = false;
return ret;
}
void SrsSource::release_publish()
{
_can_publish = true;
}
int SrsSource::on_publish()
{
int ret = ERROR_SUCCESS;