Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
iptv pipe: handle the backslash character, fixes#2487
  • Loading branch information
perexg committed Nov 18, 2014
1 parent fa22f18 commit 4f68d03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/html/config_muxes.html
Expand Up @@ -96,7 +96,9 @@
using spaces. A raw MPEG-TS stream is
expected. The string ${service_name}
is substituted with the service name
field contents.
field contents. The \ (backslash) character means
"take the next character asis" (usually
space or the backslash itself.

</dl>

Expand Down
11 changes: 9 additions & 2 deletions src/input/mpegts/iptv/iptv_pipe.c
Expand Up @@ -54,8 +54,15 @@ iptv_pipe_start ( iptv_mux_t *im, const char *_raw, const url_t *url )

while (*s && i < ARRAY_SIZE(argv) - 1) {
f = s;
while (*s && *s != ' ')
s++;
while (*s && *s != ' ') {
while (*s && *s != ' ' && *s != '\\')
s++;
if (*s == '\\') {
s++;
if (*s)
s++;
}
}
if (f != s) {
if (*s) {
*(char *)s = '\0';
Expand Down

0 comments on commit 4f68d03

Please sign in to comment.