On Sun, Jan 10, 2016 at 04:04:47AM +0100, Mats Peterson wrote:
> How about this one, Michael? Rather than using the obviously
> dangerous av_realloc() it uses av_malloc() to allocate new memory
> for the private data, then copies the private data to it, frees the
> pointer to the original private data, and finally sets
> track->codec->priv_data to the newly allocated memory.

that documentation is misleading, av_malloc() is if one is really
pedantic not safe to be passed to av_free or av_realloc()
if one isnt pedantic it safe to be passed to both

but of course theres nothing wrong with seperating them if you want
to seperate them in your code. Theres a small theretical chance that
some future platform will not work with mixed aligned memory and
realloc but would be able to mix both with free()

patch applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to