On Thu, Sep 5, 2013 at 12:33 PM, Rémi Denis-Courmont <[email protected]> wrote: >> + /** >> + * The Core Video pixel buffer that contains the current image > data. >> + * >> + * encoding: unused >> + * decoding: Set by libavcodec. Unset by user. > > That scheme cannot work and I guess it is responsible for the massive > memory leaks experienced in VLC's VDA.
IIRC the VDA framework itself creates these CVPixelBuffers (it has a pool of them). CVPixelBuffers are refcounted and if their refcount reaches 0 the underlying IOSurface can be reused by the OS. Maybe the AVFrame could be made to call CVPixelBufferRelease when it is deallocated. Client media players can then store these CVPixelBuffers and call CVPixelBufferRetain to hold onto them. Btw, I have no idea why one has to provide a get_buffer implementation when using VDA's hwaccel API since the "buffer" is created by libav itself. In mpv-player I have been providing dummy buffers... Stefano _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
