Commit b79fc4ea authored by Felix Paul Kühne's avatar Felix Paul Kühne

* split up hostname and following path and insert the port after the hostname (fixes #351)

parent 5fe3a4a3
......@@ -425,11 +425,37 @@
}
if ( ![o_mode isEqualToString: @"RTP"] )
{
/* split up the hostname and the following path to paste the
* port correctly. Not need, if there isn't any path following the
* hostname. */
NSArray * o_urlItems = [[o_stream_address stringValue] \
componentsSeparatedByString: @"/"];
NSMutableString * o_finalStreamAddress;
o_finalStreamAddress = [[NSMutableString alloc] init];
if ([o_urlItems count] == 1)
{
[o_finalStreamAddress appendFormat: @"\"%@:%@\"", \
[o_stream_address stringValue],[o_stream_port stringValue]];
}
else
{
[o_finalStreamAddress appendFormat: @"\"%@:%@", [o_urlItems \
objectAtIndex: 0], [o_stream_port stringValue]];
unsigned int x;
x = 1;
while (x != [o_urlItems count])
{
[o_finalStreamAddress appendFormat: @"/%@", [o_urlItems \
objectAtIndex: x]];
x = (x + 1);
}
[o_finalStreamAddress appendString: @"\""];
}
[o_mrl_string appendFormat:
@"std{access=%@,mux=%@,url=\"%@:%@\"%@}",
o_mode, o_mux_string, [o_stream_address stringValue],
[o_stream_port stringValue], o_announce];
@"std{access=%@,mux=%@,url=%@%@}",
o_mode, o_mux_string, o_finalStreamAddress, o_announce];
}
else
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment