iptv pipe: handle the backslash character, fixes#2487
This commit is contained in:
parent
fa22f18dfc
commit
4f68d03875
2 changed files with 12 additions and 3 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Add table
Reference in a new issue