[MPlayer-dev-eng] [PATCH] avoid memleak of audio track?extradata

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Jan 7 15:47:55 CET 2008


Hello,
On Mon, Jan 07, 2008 at 05:18:57PM +0300, Evgeniy Stepanov wrote:
> On Sunday 06 January 2008 23:52:26 Reimar Döffinger wrote:
> > On Sat, Jan 05, 2008 at 12:03:19AM +0300, Evgeniy Stepanov wrote:
> > > sh_audio_t.codecdata is never deallocated. I hope it's ok to assume that
> > > it does not contain anything fancy that would require deallocating it
> > > from a demuxer.
> >
> > I guess it is ok, though the problem is that (IMO) codecdata actually
> > should not exist, extra data should be appended after sh->wf...
> 
> wf is IMO ugly and inconvenient. Why store format description and extradata 
> together ?

firstly, extradata could in some way be considered a kind of format
description, secondly that is the way most demuxers do it currently, so
it is less effort currently. It also should make more clear that you are
not supposed to change "extradata" mid-stream.
In addition the codecdata name is bad if it is supposed to contain
what elsewhere is called extradata.
Either way, we currently have two way to do the same thing, which is bad
regardless which way is better.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list