--- mplayer/stream/url.c.guangdong~ 2009-06-02 15:54:45.000000000 +0200 +++ mplayer/stream/url.c 2009-06-02 16:12:03.109186405 +0200 @@ -104,10 +104,25 @@ url_new(const char* url) { strncpy(Curl->protocol, escfilename, pos1); Curl->protocol[pos1] = '\0'; + // Workaround for Guangdong Telecom's 10000000l Video-on-Demand system + // They link to URLs in the form of + // rtsp://movie?url=RTSP@ISMA://[real hostname, port and filename here] + if(strstr(ptr1, "://") && strstr(ptr1, "url=") && strstr(ptr1, "url=") < strstr(ptr1, "://")) { + jumpSize += strstr(ptr1, "://")-ptr1; + mp_msg(MSGT_NETWORK, MSGL_DBG2, "Workaround for Guandong Telecom VoD: set jumpSize to %u\n", jumpSize); + } + // jump the "://" ptr1 += jumpSize; pos1 += jumpSize; + // Workaround for _broken_ Guangdong Telecom + // Video on Demand system + // They send URLs like + // rtsp://movie?url=RTSP@ISMA://[real hostname:port/file combo here] + // and expect it to work... + + // check if a username:password is given ptr2 = strstr(ptr1, "@"); ptr3 = strstr(ptr1, "/"); @@ -215,6 +230,8 @@ url_new(const char* url) { strcpy(Curl->file, "/"); } + mp_msg(MSGT_NETWORK, MSGL_DBG2, "URL: %s Protocol: %s Hostname: %s File: %s User: %s Password: %s\n", Curl->url, Curl->protocol, Curl->hostname, Curl->file, Curl->username, Curl->password); + free(escfilename); return Curl; err_out: