mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 03:55:58 +08:00
优化代码
This commit is contained in:
@@ -48,10 +48,10 @@ PlayerBase::Ptr PlayerBase::createPlayer(const char* strUrl) {
|
||||
ptr->teardown();
|
||||
};
|
||||
string prefix = FindField(strUrl, NULL, "://");
|
||||
if (toolkit::strcasecmp("rtsp",prefix.data()) == 0) {
|
||||
if (strcasecmp("rtsp",prefix.data()) == 0) {
|
||||
return PlayerBase::Ptr(new RtspPlayerImp(),releasePlayer);
|
||||
}
|
||||
if (toolkit::strcasecmp("rtmp",prefix.data()) == 0) {
|
||||
if (strcasecmp("rtmp",prefix.data()) == 0) {
|
||||
return PlayerBase::Ptr(new RtmpPlayerImp(),releasePlayer);
|
||||
}
|
||||
return PlayerBase::Ptr(new RtspPlayerImp(),releasePlayer);
|
||||
|
||||
Reference in New Issue
Block a user