mirror of
https://github.com/ossrs/srs.git
synced 2025-02-14 20:31:56 +00:00
For #1031, SRS forwarder support douyu.com.
This commit is contained in:
parent
586899a010
commit
09dbda5b18
1 changed files with 11 additions and 3 deletions
|
@ -248,9 +248,17 @@ int SrsForwarder::cycle()
|
|||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = client->publish(_req->stream, stream_id)) != ERROR_SUCCESS) {
|
||||
srs_error("connect with server failed, stream_name=%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("connect with server failed, stream_name=%s, stream_id=%d. ret=%d", stream.c_str(), stream_id, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue