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

For #1031, SRS edge support douyu.com. 2.0.250

This commit is contained in:
winlin 2018-08-02 06:59:57 +08:00
parent 6d7c7418a8
commit 586899a010
3 changed files with 15 additions and 4 deletions

View file

@ -462,11 +462,20 @@ int SrsEdgeForwarder::start()
return ret;
}
if ((ret = client->publish(req->stream, stream_id)) != ERROR_SUCCESS) {
srs_error("publish failed, stream=%s, stream_id=%d. ret=%d",
req->stream.c_str(), stream_id, ret);
string stream = req->stream;
// Pass params in stream, @see https://github.com/ossrs/srs/issues/1031#issuecomment-409745733
if (!req->param.empty()) {
if (req->param.find("?") != 0) {
stream += "?";
}
stream += req->param;
}
if ((ret = client->publish(stream, stream_id)) != ERROR_SUCCESS) {
srs_error("publish failed, stream=%s, stream_id=%d. ret=%d", stream.c_str(), stream_id, ret);
return ret;
}
srs_trace("publish stream %s", stream.c_str());
return pthread->start();
}