[FFmpeg-devel] [PATCH] Bunch of accumulated patches...

Michael Niedermayer michaelni
Wed Jan 16 02:24:31 CET 2008


On Tue, Jan 15, 2008 at 10:27:06PM +0100, Sigbj?rn Skj?ret wrote:
[...]
> >>> If you have a suggestion which would be cleaner while retaining simple code,
> >>> high speed and low memory requirements, just say it ...
> >> Well, it's obviously not possible to avoid malloc&co without adding callbacks,
> >> but that would rule out stuffing it to stack...
> > Well, you might be unaware but the current tree code does avoid malloc&co
> > without callbacks. Only the destroy function is missing but its not needed
> > in the normal *malloc() free usecase. And with av_malloc() the current (old)
> > destroy works fine.
> 
> I did actually notice, the only problem is that it uses av_tree_node_size to
> accomplish this, which kind of brings us full circle .. having the caller
> allocating something your code is solely responsible for manipulating is a bad
> idea on several levels.

And that gets us back to my question, if you know a equivalently effective
and simple alternative.
If not the design is optimal (compared to all alternatives proposed) and its
your philosophical view which seems faulty.

And besides, yes i disagree, theres nothing wrong with the caller doing
allocation of needed (possibly temporary) space.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080116/62512010/attachment.pgp>



More information about the ffmpeg-devel mailing list