[FFmpeg-devel] [PATCH] avutil/internal: add FF_ALLOC_ARRAY_OR_GOTO & FF_ALLOCZ_ARRAY_OR_GOTO

Nicolas George george at nsup.org
Sat Apr 19 00:02:31 CEST 2014


Le decadi 30 germinal, an CCXXII, Nicolas George a écrit :
> A short doxy would be nice. Or at least, naming the arguments more
> explicitly than size0 and size1. Maybe nelem and elsize, like in SUS.
> 
> A lot of places would require some kind of "ret = AVERROR(ENOMEM);" before
> jumping to the failure label.
> 
> I am not sure about the unconditional log. Especially for OOM: the error
> message is completely redundant with AVERROR(ENOMEM), and someone higher in
> the call graph will probably translate the returned error code and print it.
> That will print the error message twice.

Sorry, forgot to add: since it is an internal header, it does not matter
much, it can be changed later if someone has better ideas or duplicate error
messages are annoying.

Regards,

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


More information about the ffmpeg-devel mailing list