[Theora-dev] Re: Small memory leak...

Mat heavensdoor78 at gmail.com
Thu Oct 27 03:38:20 PDT 2005


Mat wrote:

> // ...
> /* clear out state */
>    ogg_stream_clear( &to );
>    theora_clear( &td );
>
> _ogg_free(op.packet);
>
>    fclose( outfile );
>
>    free( yuvframe );
>
>    fprintf( stderr, "\r   \ndone.\n\n" );
>
>    return 0;
> }

If I put  _ogg_free(op.packet)  before  theora_clear( &td )  I get 
segfault  in  theora_clear(), if I put it  after I get segfault in 
_ogg_free(op.packet) ...
Argh... I can't get the point :(

If I look in:
    libtheora-1.0alpha5\lib\toplevel.c : 90 [ theora_encoder_clear call ]
    libtheora-1.0alpha5\lib\encoder_toplevel.c : 1191 [ 
oggpackB_writeclear call ]
it seems that the packet is free'd...



More information about the Theora-dev mailing list