[FFmpeg-devel] [PATCH 01/21] libavutil/mem: added av_arraydup to accompany av_realloc*_array functions

Erkki Seppälä erkki.seppala.ext at nokia.com
Tue Aug 23 14:10:28 EEST 2016


On 08/23/2016 02:05 PM, Michael Niedermayer wrote:
 > on which platform does av_memdup() not work with av_realloc_array() ?

I cannot indicate such a platform. However, the documentation for 
av_malloc says:

"Pointers originating from the av_malloc() family of functions
must not be passed to av_realloc(). The former can be
implemented using memalign() (or other functions), and
there is no guarantee that pointers from such functions
can be passed to realloc() at all.  The situation is
undefined according to POSIX and may crash with some
libc implementations."

And av_memdup uses av_malloc.



More information about the ffmpeg-devel mailing list