[vlc-devel] [PATCH 1/1] [transcode] Fix allocation of picture_t without full initialization
Laurent Aimar
fenrir at via.ecp.fr
Wed Nov 5 10:07:24 CET 2008
On Tue, Nov 04, 2008, David Flynn wrote:
> Hmm, doing this (as opposed to the calloc one) sems to guarantee:
> [0x818d870] stream_out_transcode decoder error: decoder/filter is leaking pictures, resetting its ring buffer
Sorry miss that transcode use a pool of video buffer.
> Ah, i see why, video_new_buffer +firends assume i_refcount starts at
> zero, whereas picture_New initializes it to one. Is the right thing to
> fix video_new_buffer +firends to work that way?
It is fine because what it does is a pool of buffers.
This pool will contain unused pictures and they should naturally have a
refcount of 0. Overriding the value to 0 (and maybe the picture status)
will do the trick as you override the destructor.
--
fenrir
More information about the vlc-devel
mailing list