From: <li...@yo...> - 2007-05-15 17:53:04
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1179251471 -3600 # Node ID 81a6e23d990a4be8cd0e9f35ce0b6df161a42fb5 # Parent add6d2a804cb075eb104f1d90eecd15a628708e1 Strip parameters from rtsp MRLs received via Real playlists. This seems to be required by at least the BBC's rtsp servers. diff -r 81a6e23d990a4be8cd0e9f35ce0b6df161a42fb5 -r add6d2a804cb075eb104f1d90eecd15a628708e1 ChangeLog --- a/ChangeLog Tue May 15 18:51:11 2007 +0100 +++ b/ChangeLog Sun May 13 15:39:13 2007 +0100 @@ -76,6 +76,7 @@ 0.5.900:2007/??/?? * Fixed parsing of negative times. * Improved the locking in the stream-opening thread. This makes it easier to stop the stream while it's still being opened. + * Strip parameters from rtsp MRLs received via Real playlists. 0.5.11: 2007/02/01 [dsalt] diff -r 81a6e23d990a4be8cd0e9f35ce0b6df161a42fb5 -r add6d2a804cb075eb104f1d90eecd15a628708e1 src/playlist.c --- a/src/playlist.c Tue May 15 18:51:11 2007 +0100 +++ b/src/playlist.c Sun May 13 15:39:13 2007 +0100 @@ -1008,8 +1008,16 @@ pl_ram_fetch (const char *const *lines, return (play_item_t *) -1; /* it's probably an RTSP or PNM MRL, but we also match HTTP here */ - if (!strncasecmp (lines[index], "rtsp://", 7) - || !strncasecmp (lines[index], "pnm://", 6) + if (!strncasecmp (lines[index], "rtsp://", 7)) + { + char line[strlen (lines[index]) + 1]; + strcpy (line, lines[index]); + char *q = strchr (line, '?'); + if (q) + *q = 0; /* strip off '?...' */ + return play_item_new (NULL, line, 0, 0); + } + if (!strncasecmp (lines[index], "pnm://", 6) || !strncasecmp (lines[index], "http://", 7)) return play_item_new (NULL, lines[index], 0, 0); |