修复Windows下可能编译失败的问题

This commit is contained in:
xiongziliang
2018-11-27 10:48:49 +08:00
parent 62f1476666
commit 858d2996c4
8 changed files with 16 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ MediaPlayer::~MediaPlayer() {
}
void MediaPlayer::play(const char* strUrl) {
string strPrefix = FindField(strUrl, NULL, "://");
if ((strcasecmp(_strPrefix.data(),strPrefix.data()) != 0) || strPrefix.empty()) {
if ((toolkit::strcasecmp(_strPrefix.data(),strPrefix.data()) != 0) || strPrefix.empty()) {
//协议切换
_strPrefix = strPrefix;
_parser = PlayerBase::createPlayer(strUrl);

View File

@@ -48,10 +48,10 @@ PlayerBase::Ptr PlayerBase::createPlayer(const char* strUrl) {
ptr->teardown();
};
string prefix = FindField(strUrl, NULL, "://");
if (strcasecmp("rtsp",prefix.data()) == 0) {
if (toolkit::strcasecmp("rtsp",prefix.data()) == 0) {
return PlayerBase::Ptr(new RtspPlayerImp(),releasePlayer);
}
if (strcasecmp("rtmp",prefix.data()) == 0) {
if (toolkit::strcasecmp("rtmp",prefix.data()) == 0) {
return PlayerBase::Ptr(new RtmpPlayerImp(),releasePlayer);
}
return PlayerBase::Ptr(new RtspPlayerImp(),releasePlayer);