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

Fix #908, use empty coroutine to avoid NULL pointer.

This commit is contained in:
winlin 2017-06-04 19:13:56 +08:00
parent 0e9e1792fe
commit 9ca36970aa
17 changed files with 115 additions and 41 deletions

View file

@ -55,7 +55,7 @@ SrsForwarder::SrsForwarder(SrsOriginHub* h)
sh_video = sh_audio = NULL;
sdk = NULL;
trd = NULL;
trd = new SrsDummyCoroutine();
queue = new SrsMessageQueue();
jitter = new SrsRtmpJitter();
}
@ -136,7 +136,7 @@ int SrsForwarder::on_publish()
req->stream.c_str());
srs_freep(trd);
trd = new SrsCoroutine("forward", this);
trd = new SrsSTCoroutine("forward", this);
if ((ret = trd->start()) != ERROR_SUCCESS) {
srs_error("start srs thread failed. ret=%d", ret);
return ret;