[FFmpeg-devel] [PATCH] url_split() ipv6 support

Ronald S. Bultje rsbultje
Fri Sep 28 22:21:41 CEST 2007


Hi,

On 9/28/07, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> i want the correct official notations supported
> that said rfc2732 and rfc3986 say [ipv6]
> and rfc4291 has no match for URI, URL or resource so i do not think that
> the other notations are defined in the context of URLs


OK, attached patch does only support [] then.

Just for reference:

$ ./test-url_split "test.avi"-> "" :// "" @ "" : "-1" / "test.avi"
"/tmp/test.mp3"-> "" :// "" @ "" : "-1" / "/tmp/test.mp3"
"file:///tmp/test.mp3"-> "file" :// "" @ "" : "-1" / "/tmp/test.mp3"
"http://www.address.com"-> "http" :// "" @ "www.address.com" : "-1" / ""
"http://www.address.com/"-> "http" :// "" @ "www.address.com" : "-1" / "/"
"http://www.address.com:80"-> "http" :// "" @ "www.address.com" : "80" / ""
"http://www.address.com:80/"-> "http" :// "" @ "www.address.com" : "80" /
"/"
"http://www.address.com:80/test.mp3"-> "http" :// "" @ "www.address.com" :
"80" / "/test.mp3"
"http://1.2.3.4:80/test.mp4"-> "http" :// "" @ "1.2.3.4" : "80" /
"/test.mp4"
* "http://:1::80:1/test.mov"-> "http" :// "" @ "" : "1" / "/test.mov"
* "http://:::80/test.mp5"-> "http" :// "" @ "" : "0" / "/test.mp5"
"http://[::1]:80/test.mp6"-> "http" :// "" @ "::1" : "80" / "/test.mp6"
"http://[host.address]:80/test.mp3"-> "http" :// "" @ "host.address" : "80"
/ "/test.mp3"
"file:///[pat]h/to/file.mp3"-> "file" :// "" @ "" : "-1" /
"/[pat]h/to/file.mp3"
* "http://1:2:3:4:5:6:7:8:80/test.mp3"-> "http" :// "" @ "1" : "2" /
"/test.mp3"
"http://me@:::80/test.mp3"-> "http" :// "me" @ "" : "0" / "/test.mp3"
"http://me:x@:::80/test.mp3"-> "http" :// "me:x" @ "" : "0" / "/test.mp3"

The three marked with * fail and that's OK in this case.

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-url_split-ipv6.patch
Type: application/octet-stream
Size: 1451 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070928/a7fec6f1/attachment.obj>



More information about the ffmpeg-devel mailing list