[FFmpeg-devel] [PATCH] Make RTP work with IPv6 enabled

Ronald S. Bultje rsbultje
Thu Oct 18 00:50:41 CEST 2007


Hi Diego,

On 10/17/07, Diego Biurrun <diego at biurrun.de> wrote:
>
> > > > > --- libavformat/utils.c       (revision 10736)
> > > > > +++ libavformat/utils.c       (working copy)
> > > > > @@ -2875,7 +2875,7 @@
> > > > >                 char *path, int path_size,
> > > > >                 const char *url)
> > > > >  {
> > > > > -    const char *p, *ls, *at, *col, *brk;
> > > > > +    const char *p, *ls, *at, *col, *brk, *q;
> > > > >
> > > > >      if (port_ptr)               *port_ptr = -1;
> > > > >      if (proto_size > 0)         proto[0] = 0;
> > > > > @@ -2896,9 +2896,12 @@
> > > > >      }
> > > > >
> > > > >      /* separate path from hostname */
> > > > > -    if ((ls = strchr(p, '/')))
> > > > > -        av_strlcpy(path, ls, path_size);
> > > > > -    else
> > > > > +    if ((ls = strchr(p, '/'))) {
> > > > > +        if ((q = strchr(ls, '?')))
> > > > > +            av_strlcpy(path, ls, FFMIN(path_size, q - ls + 1));
> > > > > +        else
> > > > > +            av_strlcpy(path, ls, path_size);
> > > > > +    } else if (!(ls = strchr(p, '?')))
> > > > >          ls = &p[strlen(p)]; // XXX

[..]

> Ronald, can you provide us with a sensible commit log message?  I
> believe the patch will be applied in no time then.


How about "have url_split() strip url options (?opt=var) from the returned
hostname or location, fixes a regression introduced by the rewrite of
url_split() in r10605"?

Ronald




More information about the ffmpeg-devel mailing list