summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_real.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-01-05 00:44:49 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-01-05 00:44:49 +0100
commitc81c9deccc79646bd7ac3f1759a4a3e4fb8a88af (patch)
treeb39027bf19757a904f9d306085d8744046f24a1f /src/demuxers/demux_real.c
parent119076c9300e2e2a816dc1a6ca32ba77f338b20c (diff)
parenta2a95425350da93551388acdca8a00818a34c317 (diff)
downloadxine-lib-c81c9deccc79646bd7ac3f1759a4a3e4fb8a88af.tar.gz
xine-lib-c81c9deccc79646bd7ac3f1759a4a3e4fb8a88af.tar.bz2
Merge from 1.2.
Diffstat (limited to 'src/demuxers/demux_real.c')
-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 bd5bb4021..21308bd45 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -798,8 +798,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.
@@ -814,8 +823,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';
@@ -1524,7 +1533,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;