Marton Balint (12020-05-12): > You mean this? > > #define FF_ALLOC_ARRAY_OR_ERROR(p, nelem, elsize, errstatement)\ > {\ > p = av_malloc_array(nelem, elsize);\ > if (!p) {\ > errstatement; \ > }\ > }
Exactly. But I am rather in favor of making "something = AVERROR(ENOMEM)" mandatory too: #define FF_ALLOC_ARRAY_OR_ERROR(p, nelem, elsize, ret, errstatement)\ {\ p = av_malloc_array(nelem, elsize);\ if (!p) {\ ret = AVERROR(ENOMEM); \ errstatement; \ }\ } Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".