[FFmpeg-devel] Question: infinite loop in av_tree_destroy(..)

Aurelien Jacobs aurel
Sun Jan 4 18:49:08 CET 2009


Michael Niedermayer wrote:

> On Sat, Jan 03, 2009 at 07:43:43PM +0100, Aurelien Jacobs wrote:
> > Stefano Sabatini wrote:
> > 
> > > On date Saturday 2009-01-03 23:37:55 +0800, avcoder encoded:
> > > > Dear:
> > > > //@file:libavutil/tree.c
> > > > void av_tree_destroy(AVTreeNode *t){
> > > >     av_tree_destroy(t->child[0]);
> > > >     av_tree_destroy(t->child[1]);
> > > >     av_free(t);
> > > > }
> > > > 
> > > > It seems that the codes is wrong!
> > > 
> > > Looks OK to me. Why do you think is wrong?
> > 
> > Because it lacks an ending condition...
> > Something like this may be better:
> 
> looks ok

applied

Aurel




More information about the ffmpeg-devel mailing list