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

For #913, coroutine support complex error.

This commit is contained in:
winlin 2017-06-11 18:44:20 +08:00
parent 9ae54850bf
commit 9db2a04c3b
38 changed files with 620 additions and 414 deletions

View file

@ -656,6 +656,7 @@ int SrsRtmpConn::check_vhost(bool try_default_vhost)
int SrsRtmpConn::playing(SrsSource* source)
{
int ret = ERROR_SUCCESS;
srs_error_t err = srs_success;
// create consumer of souce.
SrsConsumer* consumer = NULL;
@ -671,7 +672,11 @@ int SrsRtmpConn::playing(SrsSource* source)
SrsQueueRecvThread trd(consumer, rtmp, SRS_PERF_MW_SLEEP);
// start isolate recv thread.
if ((ret = trd.start()) != ERROR_SUCCESS) {
if ((err = trd.start()) != srs_success) {
// TODO: FIXME: Use error
ret = srs_error_code(err);
srs_freep(err);
srs_error("start isolate recv thread failed. ret=%d", ret);
return ret;
}
@ -919,13 +924,18 @@ int SrsRtmpConn::publishing(SrsSource* source)
int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* rtrd)
{
int ret = ERROR_SUCCESS;
srs_error_t err = srs_success;
SrsRequest* req = info->req;
SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_publish();
SrsAutoFree(SrsPithyPrint, pprint);
// start isolate recv thread.
if ((ret = rtrd->start()) != ERROR_SUCCESS) {
if ((err = rtrd->start()) != srs_success) {
// TODO: FIXME: Use error
ret = srs_error_code(err);
srs_freep(err);
srs_error("start isolate recv thread failed. ret=%d", ret);
return ret;
}