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

For #913, source support complex error

This commit is contained in:
winlin 2017-09-23 22:12:33 +08:00
parent abcaba33ee
commit 9802dc326e
24 changed files with 1029 additions and 1437 deletions

View file

@ -368,6 +368,7 @@ void SrsPublishRecvThread::stop()
int SrsPublishRecvThread::consume(SrsCommonMessage* msg)
{
int ret = ERROR_SUCCESS;
srs_error_t err = srs_success;
// when cid changed, change it.
if (ncid != cid) {
@ -386,7 +387,10 @@ int SrsPublishRecvThread::consume(SrsCommonMessage* msg)
srs_update_system_time_ms(), msg->header.timestamp, msg->size);
// the rtmp connection will handle this message
ret = _conn->handle_publish_message(_source, msg);
err = _conn->handle_publish_message(_source, msg);
// TODO: FIXME: Use error
ret = srs_error_code(err);
srs_freep(err);
// must always free it,
// the source will copy it if need to use.