[FFmpeg-cvslog] mem: Document the av_realloc family of functions properly

Nicolas George nicolas.george at normalesup.org
Wed Sep 11 14:27:10 CEST 2013


L'octidi 18 fructidor, an CCXXI, Clément Bœsch a écrit :
> Can someone explains to me what the hell that means? Is this a typo?
> 
> AFAIK it just means the alignment might not be preserved. What am I
> missing?

Actually no, the spec really says that only memory allocated by
malloc()/calloc()/realloc() can be used with realloc, and therefore not
av_malloc() since it calls posix_memalign().

In practice, that means you can only use av_realloc() with itself, i.e.
starting with NULL and reallocating larger. That is already what most code
does anyway.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20130911/e2d52c01/attachment.asc>


More information about the ffmpeg-cvslog mailing list