[FFmpeg-devel] [PATCH] url_split() ipv6 support
Gary Corcoran
gcorcoran
Thu Sep 27 21:20:42 CEST 2007
Ronald S. Bultje wrote:
> Hi,
>
> On 9/27/07, Andreas ?man <andreas at olebyn.nu> wrote:
>> $ ./ffmpeg -i http://lonelycoder.com/hd/test_smp_fox.ts
>>
>> (A not very uncommon url-format :-)
>>
>> http://lonelycoder.com/hd/test_smp_fox.ts: I/O error occured
>> Usually that means that input file is truncated and/or corrupted.
>>
>> but this works:
>>
>> $ ./ffmpeg -i http://lonelycoder.com:80/hd/test_smp_fox.ts
>
>
> Oh right, I don't assign the port if it isn't there, the old one did (to
> zero). New patch attached. I'd still like that fixed but then I should
> probably fix the callers also to not rely on it. What I'd like is this:
>
> #define DEFAULT_PORT 80
>
> int port = DEFAULT_PORT
> url_split(..., &port, ...);
>
> right now we get this:
>
> int port;
> url_split(..., &port, ...);
> if (port == 0) port = DEFAULT_PORT;
I would suggest that if your parsing does not find an explicit port
number, that _your_ code set the port to the implied '80'.
Gary
More information about the ffmpeg-devel
mailing list