[FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

James Almer jamrial at gmail.com
Tue Nov 3 15:05:16 EET 2020


On 11/3/2020 9:12 AM, Anton Khirnov wrote:
> Quoting Joakim Tjernlund (2020-11-03 12:39:53)
>> Pretty please ?
> 
> ok, would people who are strongly against this patch please raise their
> hands.

Would applying this to master now (backporting it to 4.3 too) and then
reverting it at the time of the major bump work? The idea here if i
understood correctly is to keep ABI compatibility with software that was
linked to <= 4.2 and can't be recompiled to replace av_malloc_max(0)
calls with av_malloc_max(SIZE_MAX), right?
Because requesting for example a limit of 31 resulting in av_malloc()
having practically no limit is pretty silly and should have never happened.

> Personally I'm ok with pushing this, even though it's ugly. Then again
> the vey existence of av_malloc_max is ugly and it should be deprecated
> IMO.

Is there any real world use examples of it (outside of 0/SIZE_MAX to
disable the default INT_MAX limit)? Maybe it's superfluous and can be
removed just fine.


More information about the ffmpeg-devel mailing list