From: Darren S. <ds...@us...> - 2007-05-15 18:40:47
|
Update of /cvsroot/xine/xine-plugin/src In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10750/src Modified Files: plugin.c Log Message: Strip parameters from rtsp URLs received via Real playlists. Add some content to the changelog :-) Index: plugin.c =================================================================== RCS file: /cvsroot/xine/xine-plugin/src/plugin.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- plugin.c 23 Jan 2007 11:15:33 -0000 1.69 +++ plugin.c 15 May 2007 18:40:44 -0000 1.70 @@ -267,13 +267,18 @@ while (this->track && this->playing) { playlist_entry_t *track = this->track; const char *error; - char buf[4096]; + char buf[4096], *q; int len = 0; int ret; if (!strstr (track->mrl, "://") && access (track->mrl, F_OK)) len = snprintf (buf, sizeof(buf), "%s", this->base); - len += snprintf (buf+len, sizeof(buf)-len, "%s", track->mrl); + + /* truncate RTSP MRL at '?': seems that servers dislike the MRL otherwise */ + q = strncasecmp (track->mrl, "rtsp://", 7) ? NULL : strchr (track->mrl, '?'); + + len += snprintf (buf+len, sizeof(buf)-len, "%.*s", + (int)(q ? q - track->mrl : sizeof(buf)-len), track->mrl); if (*this->demux) snprintf (buf+len, sizeof(buf)-len, "#demux:%s", this->demux); |