[FFmpeg-devel] [PATCH] lavu: add av_bprintf and related.
Nicolas George
nicolas.george at normalesup.org
Wed Mar 14 16:55:55 CET 2012
Le quintidi 25 ventôse, an CCXX, Stefano Sabatini a écrit :
> > +static int av_bprint_alloc(AVBPrint *buf, unsigned room)
> nit++: _alloc -> _realloc better expresses what the function does
I see buf as the subject, not the object: "please, buf, allocate room bytes
for the string I want to add".
> OK, but this is setting an hard limit on the maximum length for the
> stored string (UINT_MAX-5), mentioning it in the header may be
> helpful, something like:
>
> #define AV_BPRINT_MAX_STRING_LEN ...
I do not want the exact value of the margin to be part of the ABI. I believe
it should be obvious for anyone that len being an unsigned int means that
the API is not suited when the length of the string can become close to
UINT_MAX.
> Either way I'm fine with the patch.
If there are no further remarks, I'll apply in a few hours when I am done
with other works.
Thanks for your comments.
Regards,
--
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/20120314/fb291ef1/attachment.asc>
More information about the ffmpeg-devel
mailing list