summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_real.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-01-06 21:20:29 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-01-06 21:20:29 +0000
commit28665f4a2ca6dea9eaafba8d2abbd9472bd061db (patch)
tree6401e38414451275d48d58b7939dc1feee41178b /src/demuxers/demux_real.c
parenta2a95425350da93551388acdca8a00818a34c317 (diff)
parent6255dcb866af030b0122c061459ab587a0d8c074 (diff)
downloadxine-lib-28665f4a2ca6dea9eaafba8d2abbd9472bd061db.tar.gz
xine-lib-28665f4a2ca6dea9eaafba8d2abbd9472bd061db.tar.bz2
Merge from 1.1.
--HG-- rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/libffmpeg/ff_video_decoder.c => src/combined/ffmpeg/ff_video_decoder.c rename : src/libsputext/xine_sputext_decoder.c => src/spu_dec/sputext_decoder.c
Diffstat (limited to 'src/demuxers/demux_real.c')
-rw-r--r--src/demuxers/demux_real.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index 21308bd45..8f6ce0611 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -800,12 +800,22 @@ static int demux_real_parse_references( demux_real_t *this) {
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);
+ i = 0;
+ while (buf[i])
+ {
+ j = i;
+ while (buf[i] && !isspace(buf[i]))
+ ++i; /* skip non-space */
+ len = buf[i];
+ buf[i] = 0;
+ if (strncmp (buf + j, "http://", 7) || (i - j) < 8)
+ break; /* stop at the first non-http reference */
+ lprintf("reference [%s] found\n", buf + j);
+ _x_demux_send_mrl_reference (this->stream, 0, buf + j, NULL, 0, 0);
+ buf[i] = (char) len;
+ while (buf[i] && isspace(buf[i]))
+ ++i; /* skip spaces */
+ }
}
else for (i = 0; i < buf_used; ++i)
{