On Fri, Aug 25, 2017 at 11:25:11AM -0700, John Rummell wrote:
> Chromium uses tcmalloc which doesn't like mixing calls to posix_memalign()
> and realloc(). This change updates mov.c to only use av_realloc() when
> allocating memory for AVCodecParameters.extradata.
> ---
>  libavformat/mov.c | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)

I dont think this is a practical solution.
having av_malloc and av_realloc incompatible is not a path that is
maintainable. No matter how hard people want that.

The fix to this is to make av_malloc() and av_realloc() compatible.

Does tcmalloc() provide sufficient alignment ? if so there is no
need for posix_memalign().
If not thats a shortcomming of tcmalloc() and something that especially
for a performance oriented malloc would seem out of place.

Fixing tcmalloc() so it can interoperate with posix_memalign(), for
example by also overriding posix_memalign() or whatever would also be
an option

but the code removed in
3835283293bfd38ba69203f4618f0f0f21377bcc
also would be a fix for this

again, i dont object to the patch, i just dont think this is practical
maintaince wise.

having av_malloc() and av_realloc* incompatible is a minefield and
something that creates an endless stream of bugs, work and bugfixes.
Making them compatible would lead to much more robust code


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA

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