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

Michael Niedermayer michaelni
Thu Sep 27 13:03:43 CEST 2007


Hi

On Thu, Sep 27, 2007 at 12:51:39AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On 9/23/07, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> >
> > see $subj, this patch adds support for parsing hostnames such as:
> > proto://[ipv6host]:port/address
> > proto://ipv6host:port/address
> 
> [..]
> 
> Ping?

url_split() looks messy, maybe we should clean it up first, maybe something
like:

char tmp[256];
int count;
proto[0] = auth[0]= 0;
if(sscanf(p, "%255[^:]:%*[:/]%n", &tmp, &count) == 2){
    av_strlcpy(proto, tmp, proto_size);
    p+= count;
}
if(sscanf(p, "%255[^@/]@%n", &tmp, &count) == 2){
    av_strlcpy(auth, tmp, auth_size);
    p+= count;
}


could be used?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070927/4e0604ff/attachment.pgp>



More information about the ffmpeg-devel mailing list