[vlc-devel] commit: Fix memleak (should fix #1081) ( Rémi ?Duraffort )
fenrir at via.ecp.fr
Mon Aug 25 01:48:28 CEST 2008
On Mon, Aug 25, 2008, Laurent Aimar wrote:
> On Mon, Aug 25, 2008, Pierre d'Herbemont wrote:
> > On Aug 25, 2008, at 12:35 AM, Ilkka Ollakka wrote:
> > > On su 24. elokuuta 2008 21:14:35, git version control wrote:
> > >> vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun
> > >> Aug 24 20:56:56 2008 +0200|
> > >> [4774dc6c9f7b04b40f90e4edc9ad1a1f8d256f1d] | committer: Rémi
> > >> Duraffort
> > >>
> > >> Fix memleak (should fix #1081)
> > >>
> > >
> > > This seems to cause segfault for me when module is unloaded in 64bit
> > > linux.
> > The patch is wrong anyway: strangely in_block ownership goes to the
> > packetizer. IMO, we don't have refcounting for block, and that doesn't
> > seem right.
> You do not need block refcounting (and it would not be that easy, as a
> nearly anything that works with block can modify its content).
> Anyway, if a packetizer releases an input block it will set the block
> pointer to NULL if not, the block is not released.
> The ownership of the input block always stays to the caller.
Oops sorry, I mixed up.
When you give a packet to a decoder/packetizer, you give the ownership
to it (like for all audio/video filter).
The only thing you have to take care is that you SHOULD call the packetizer
until it return NULL. That's what mpga.c demuxer does not do int the Open
More information about the vlc-devel