[FFmpeg-devel] [PATCH] lavu: add av_bprintf and related.

Nicolas George nicolas.george at normalesup.org
Wed Feb 22 22:19:09 CET 2012

Le quartidi 4 ventôse, an CCXX, Clément Bœsch a écrit :
> > +#define av_bprint_room(buf) ((buf)->size - FFMIN((buf)->len, (buf)->size))
> > +#define av_bprint_is_allocated(buf) ((buf)->str != (buf)->reserved_internal_buffer)
> I don't really like the av_ prefix since it is not exported.

It may become exported in the future, better to avoid having the change the
name in the code. I use the rule of thumb: if it has a well defined
self-contained behaviour, put it in the same namespace. But I am not adamant
about it.

> git complains about this trailing \n


> Is the __VA_ARGS__ really needed?

Not really in this particular case, but it would be if the structure
definition had comas: better to keep it generic, in case it is needed

> Thank you for the long explanation (though, examples/tests are nice :-°).
> Anyway, it looks good enough to be applied if tested, so no more comment
> from me.

Thanks. I have tested it by using it in lavfi/graphdump.c; it can serve as
example for now. I keep in mind to add tests and more direct examples when I
will delve into FATE.

> Note: don't forget to update APIChanges and bump

Done. I try to avoid to do it too early because they cause conflicts, or
even worse, are forgotten in a rebase.

I will let a few additional days for the more senior developers to express
their concern, and I will apply if there are no more remarks.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120222/7d21424c/attachment.asc>

More information about the ffmpeg-devel mailing list