Fixed VLC-specific format RTMP URLs.
This commit is contained in:
parent
109fa4d91f
commit
4e50f13d03
1 changed files with 17 additions and 1 deletions
|
@ -447,6 +447,18 @@ namespace Mist {
|
|||
if ((amfData.getContentP(0)->StrValue() == "publish")) {
|
||||
if (amfData.getContentP(3)) {
|
||||
streamName = amfData.getContentP(3)->StrValue();
|
||||
|
||||
|
||||
size_t colonPos = streamName.find(':');
|
||||
if (colonPos != std::string::npos && colonPos < 6){
|
||||
std::string oldName = streamName;
|
||||
if (std::string(".")+oldName.substr(0, colonPos) == oldName.substr(oldName.size() - colonPos - 1)){
|
||||
streamName = oldName.substr(colonPos + 1);
|
||||
}else{
|
||||
streamName = oldName.substr(colonPos + 1) + std::string(".") + oldName.substr(0, colonPos);
|
||||
}
|
||||
}
|
||||
|
||||
Util::sanitizeName(streamName);
|
||||
//pull the server configuration
|
||||
IPC::sharedPage serverCfg("!mistConfig", DEFAULT_CONF_PAGE_SIZE); ///< Contains server configuration and capabilities
|
||||
|
@ -525,7 +537,11 @@ namespace Mist {
|
|||
size_t colonPos = streamName.find(':');
|
||||
if (colonPos != std::string::npos && colonPos < 6){
|
||||
std::string oldName = streamName;
|
||||
streamName = oldName.substr(colonPos + 1) + std::string(".") + oldName.substr(0, colonPos);
|
||||
if (std::string(".")+oldName.substr(0, colonPos) == oldName.substr(oldName.size() - colonPos - 1)){
|
||||
streamName = oldName.substr(colonPos + 1);
|
||||
}else{
|
||||
streamName = oldName.substr(colonPos + 1) + std::string(".") + oldName.substr(0, colonPos);
|
||||
}
|
||||
}
|
||||
Util::sanitizeName(streamName);
|
||||
initialize();
|
||||
|
|
Loading…
Add table
Reference in a new issue