mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
support create stream twice. 0.9.145
This commit is contained in:
parent
fb70602f93
commit
ba2e7bbf76
2 changed files with 20 additions and 1 deletions
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR "0"
|
#define VERSION_MAJOR "0"
|
||||||
#define VERSION_MINOR "9"
|
#define VERSION_MINOR "9"
|
||||||
#define VERSION_REVISION "143"
|
#define VERSION_REVISION "145"
|
||||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
|
@ -996,6 +996,21 @@ int SrsRtmpServer::identify_client(int stream_id, SrsRtmpConnType& type, string&
|
||||||
srs_info("level0 identify client by play.");
|
srs_info("level0 identify client by play.");
|
||||||
return identify_play_client(dynamic_cast<SrsPlayPacket*>(pkt), type, stream_name, duration);
|
return identify_play_client(dynamic_cast<SrsPlayPacket*>(pkt), type, stream_name, duration);
|
||||||
}
|
}
|
||||||
|
// call msg,
|
||||||
|
// support response null first,
|
||||||
|
// @see https://github.com/winlinvip/simple-rtmp-server/issues/106
|
||||||
|
// TODO: FIXME: response in right way, or forward in edge mode.
|
||||||
|
SrsCallPacket* call = dynamic_cast<SrsCallPacket*>(pkt);
|
||||||
|
if (call) {
|
||||||
|
SrsCallResPacket* res = new SrsCallResPacket(call->transaction_id);
|
||||||
|
res->command_object = SrsAmf0Any::null();
|
||||||
|
res->response = SrsAmf0Any::null();
|
||||||
|
if ((ret = protocol->send_and_free_packet(res, 0)) != ERROR_SUCCESS) {
|
||||||
|
srs_warn("response call failed. ret=%d", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
srs_trace("ignore AMF0/AMF3 command message.");
|
srs_trace("ignore AMF0/AMF3 command message.");
|
||||||
}
|
}
|
||||||
|
@ -1387,6 +1402,10 @@ int SrsRtmpServer::identify_create_stream_client(SrsCreateStreamPacket* req, int
|
||||||
srs_info("identify client by publish, falsh publish.");
|
srs_info("identify client by publish, falsh publish.");
|
||||||
return identify_flash_publish_client(dynamic_cast<SrsPublishPacket*>(pkt), type, stream_name);
|
return identify_flash_publish_client(dynamic_cast<SrsPublishPacket*>(pkt), type, stream_name);
|
||||||
}
|
}
|
||||||
|
if (dynamic_cast<SrsCreateStreamPacket*>(pkt)) {
|
||||||
|
srs_info("identify client by create stream, play or flash publish.");
|
||||||
|
return identify_create_stream_client(dynamic_cast<SrsCreateStreamPacket*>(pkt), stream_id, type, stream_name, duration);
|
||||||
|
}
|
||||||
|
|
||||||
srs_trace("ignore AMF0/AMF3 command message.");
|
srs_trace("ignore AMF0/AMF3 command message.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue