优化代码

This commit is contained in:
xiongziliang
2018-11-27 11:05:44 +08:00
parent 858d2996c4
commit ad25ea184c
8 changed files with 16 additions and 16 deletions

View File

@@ -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);