[FFmpeg-devel] [RFC] libavformat: URL reassembly with IPv6 addresses

Martin Storsjö martin
Thu Mar 4 10:11:53 CET 2010


Hi Luca,

On Thu, 4 Mar 2010, Luca Abeni wrote:

> Martin Storsj? wrote:
> [...]
> > > From the description, I think I like the idea ;-)
> > > I'll look at the details and at the actual patch, and provide some
> > > comments, tomorrow.
> > 
> > Had time to have a look yet?
> > 
> > // Martin
> 
> I looked at it now ;-)
> Looks ok; I just have 2 comments (uhmm... Maybe 3 :):
> 1) It seems to me that the authorization only makes sense when a
>    protocol is specified... No? So, I'd put the
> 	+    if (authorization)
> 	+        av_strlcatf(str, size, "%s:", authorization);
>    inside the "if (proto)"

Hmm, I don't see these fields as all that tightly coupled, so I think I 
still prefer adding authorization regardless of protocol. But none of the 
current use cases in libavformat use authorization at all.

> 2) I think this function should return the number of written
>    characters, or some value which allows to check if "str"
>    was large enough... I mean: if more than "size" characters
>    are needed, ff_url_format() will silently drop the last part
>    of the URL, and the caller will have no easy way to detect
>    this

Ah, good idea, I'll give this a shot.

> Moreover, I would not export this function, so I'd put the
> prototype somewhere else than in avformat.h. And I am not
> sure if utils.c is the right place for implementing it (maybe,
> it can be implemented in some C file that already includes
> network.h).

It's not publicly exported at the moment, it's within #ifdef 
HAVE_AV_CONFIG_H in avformat.h, where a few other internal, libavformat 
common functions are declared.

// Martin



More information about the ffmpeg-devel mailing list