diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2003-10-28 21:14:17 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2003-10-28 21:14:17 +0000 |
commit | c5e385c0e1c7fa467db1e2317b49614efad7938f (patch) | |
tree | 64046da781e5d60d7f4aa939b4f6355da8e94d3c /src | |
parent | fcdb982deebb5deabfb0070aad756a1ea0335c99 (diff) | |
download | xine-lib-c5e385c0e1c7fa467db1e2317b49614efad7938f.tar.gz xine-lib-c5e385c0e1c7fa467db1e2317b49614efad7938f.tar.bz2 |
Handle comments in rpm files
CVS patchset: 5631
CVS date: 2003/10/28 21:14:17
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_real.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index cfcdbab8b..476273b57 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -30,7 +30,7 @@ * * Based on FFmpeg's libav/rm.c. * - * $Id: demux_real.c,v 1.66 2003/10/27 23:23:29 tmattern Exp $ + * $Id: demux_real.c,v 1.67 2003/10/28 21:14:17 jstembridge Exp $ */ #ifdef HAVE_CONFIG_H @@ -707,6 +707,7 @@ static int demux_real_parse_references( demux_real_t *this) { int buf_used = 0; int len, i, j; int alternative = 0; + int comment = 0; xine_mrl_reference_data_t *data; xine_event_t uevent; @@ -739,7 +740,15 @@ static int demux_real_parse_references( demux_real_t *this) { if( !strncmp(&buf[i],"--stop--",8) ) alternative++; - if( !strncmp(&buf[i],"pnm://",6) || !strncmp(&buf[i],"rtsp://",7) ) { + /* rpm files can contain comments which should be skipped */ + if( !strncmp(&buf[i],"<!--",4) ) + comment = 1; + + if( !strncmp(&buf[i],"-->",3) ) + comment = 0; + + 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'; |