[FFmpeg-devel] [PoC][PATCH 1/2] avutil/buffer: add av_buffer_create2() to allow AVBufferRef to store complex structures

Anton Khirnov anton at khirnov.net
Tue Jun 2 13:58:35 EEST 2020


Quoting James Almer (2020-06-01 22:55:12)
> Also, i've noticed the way the buffer pools in some of the hwcontext
> implementations are used is very wtf, being both extremely fragile/hacky
> and depending on undocumented behavior. I didn't test, but i suspect
> that configuring with --enable-memory-poisoning will break a few of
> them, like d3d11, as they depend on the buffer returned by the pool to
> be in the exact same state as it was last time it was returned to the
> pool, which is not how the pools are meant to work. But i also don't
> think this patch here would help much in that regard.

As I see it, that problem is rooted exactly in using AVBuffer as
something it's not supposed to be. But changing that at this point would
be very invasive.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list