Skip to content

Commit

Permalink
For #1031, SRS forwarder support douyu.com.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 1, 2018
1 parent 586899a commit 09dbda5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions trunk/src/app/srs_app_forward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 09dbda5

Please sign in to comment.