Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IPTV: fix mm_iptv_url_sane build - add the UDP/TCP port number
  • Loading branch information
perexg committed May 6, 2015
1 parent ea9cd4c commit 7cf9325
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/input/mpegts/iptv/iptv_mux.c
Expand Up @@ -66,13 +66,13 @@ iptv_mux_url_set ( void *p, const void *v )
(url.path ? strlen(url.path) + 1 : 0) +
(url.query ? strlen(url.query) + 2 : 0);
buf = alloca(len);
if (url.port)
snprintf(port, sizeof(port), "%d", url.port);
snprintf(buf, len, "%s%s%s%s%s%s",
if (url.port > 0 && url.port <= 65535)
snprintf(port, sizeof(port), ":%d", url.port);
snprintf(buf, len, "%s%s%s%s%s%s%s",
url.scheme ?: "", url.scheme ? "://" : "",
url.host ?: "",
url.host ?: "", port,
url.path ?: "", url.query ? "?" : "",
url.query);
url.query ?: "");
im->mm_iptv_url_sane = strdup(buf);
} else {
im->mm_iptv_url_sane = NULL;
Expand Down

0 comments on commit 7cf9325

Please sign in to comment.