[FFmpeg-devel] [PATCH 1/3] libavutil: AVEncodeInfo data structures

Juan De León juandl at google.com
Fri Aug 23 23:19:18 EEST 2019


On Fri, Aug 23, 2019 at 12:28 PM Nicolas George <george at nsup.org> wrote:

> Juan De León (12019-08-23):
> > I changed it to an inline function, returns SIZE_MAX if it fails to make
> > av_malloc() fail and return NULL.
>
> You neglected to check for SIZE_MAX afterwards. I suspect there are
> architectures where such a malloc could succeed.
>
I doubt it since av_malloc() checks for size > INT_MAX - 32.
Maybe in a 16 bit system.

But in this case, a macro would probably be the simplest.
>
I'm sending a new patch with a macro.


More information about the ffmpeg-devel mailing list