summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-12-26 15:43:30 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-12-26 15:43:30 +0000
commitdc18a39496751afaf27e0320cf5a8195c0548e80 (patch)
tree91a694b878dfef22bed869051723db113f70b8a1
parent9f911a4387602eba171b314e3cfe02ce0deabf60 (diff)
downloadxine-lib-dc18a39496751afaf27e0320cf5a8195c0548e80.tar.gz
xine-lib-dc18a39496751afaf27e0320cf5a8195c0548e80.tar.bz2
Fix pls parsing (broken in cset e0819c1c624a).
(transplanted from c139cfe735874922208d936c8e49bbfa532ed2ec) --HG-- extra : transplant_source : %C19%CF%E75%87I%22%20%8D%93l%8EI%BB%FAS.%D2%EC
-rw-r--r--src/demuxers/demux_real.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index 938e1ca24..85d7dc5a3 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -804,8 +804,17 @@ static int demux_real_parse_references( demux_real_t *this) {
lprintf("received %d bytes [%s]\n", buf_used, buf);
- for(i=0;i<buf_used;i++) {
-
+ if (!strncmp(buf,"http://",7))
+ {
+ for (i = 0; buf[i] && !isspace(buf[i]); ++i)
+ /**/;
+ buf[i] = 0;
+ lprintf("reference [%s] found\n", buf);
+
+ _x_demux_send_mrl_reference (this->stream, 0, buf, NULL, 0, 0);
+ }
+ else for (i = 0; i < buf_used; ++i)
+ {
/* "--stop--" is used to have pnm alternative for old real clients
* new real clients will stop processing the file and thus use
* rtsp protocol.
@@ -820,8 +829,8 @@ static int demux_real_parse_references( demux_real_t *this) {
if( !strncmp(&buf[i],"-->",3) )
comment = 0;
- if( (!strncmp(&buf[i],"pnm://",6) || !strncmp(&buf[i],"rtsp://",7) ||
- !strncmp(&buf[i],"http://",7)) && !comment ) {
+ if( (!strncmp(&buf[i],"pnm://",6) || !strncmp(&buf[i],"rtsp://",7)) &&
+ !comment ) {
for(j=i; buf[j] && buf[j] != '"' && !isspace(buf[j]); j++ )
;
buf[j]='\0';
@@ -1533,7 +1542,7 @@ static int real_check_stream_type(uint8_t *buf, int len)
buf[len] = '\0';
if( strstr(buf,"pnm://") || strstr(buf,"rtsp://") || strstr(buf,"<smil>") ||
- strstr(buf,"http://") )
+ !strncmp(buf,"http://",7) )
return 2;
return 0;