[MPlayer-users] Problem while playing streams over ipv6
kenniyon at 163.com
Fri Mar 18 04:24:33 CET 2005
I downloaded MPlayer v1.0pre6a source and compled & installed it on my machine(GNU/Debian 2.6.8-1-686, Athlon xp 2200+)
I tried playing mms stream over our school's recently established ipv6 network and found a problem:
when i try a url in a domain form, like
mplayer works fine.
but when the url is in an ipv6 address form as in
mms://[2001:da8:8000:1::84]/cctv1 (which is the address of the domain above)
mplayer can't find the address...i found lines in the printout:
Resolving %5B2001 for AF_INET6...
Couldn't resolve name for AF_INET6: %5B2001
Resolving %5B2001 for AF_INET...
Couldn't resolve name for AF_INET: %5B2001
Check if this is a playlist which requires -playlist option
Example: mplayer -playlist <url>
Unable to open URL: mms://[2001:da8:8000:1::84]/cctv1
Exiting... (End of file)
seems that mplayer still takes the ipv6 address as a domain and tries to resolve it...after reading the code related to url handling, i found that in line 55 of
where url_new() calling url_escape_string() to create unescaped/escaped versions of url, url_escape_string() simply escapes '[' and ']' and turn them into %5B and %5D, respectively.
But from line 133 to line 145 url_new() tries to find '[' and ']' again (which has been escaped already) to determine whether url is an ipv6 addr...
i think that's the reason mplayer treats ipv6 addr as a domain rather an address
i examined it after modifying the definition of url_escape_string() (letting it not escape '[' and ']') and it prove true, mplayer can handle the ipv6 addr after the modification..
i know that it's a bad modification because it somehow destroys the purpose of url_escape_string()...so i think it's better to leave it to the developers to handle it...
ps: Since i can't manage to download the daily cvs version(due to local firewalls), so maybe you guys have fixed it already...anyway i just send it out in case
More information about the MPlayer-users