<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
Ralph Giles wrote:
<blockquote cite="mid20051027230945.GA9295@ghostscript.com" type="cite">
<pre wrap="">On Thu, Oct 27, 2005 at 12:38:20PM +0200, Mat wrote:</pre>
<blockquote type="cite">
<pre wrap="">f 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 :(
</pre>
</blockquote>
<pre wrap=""><!---->You want to call _ogg_free(op.packet) on line 196, after you call
ogg_stream_packetin() which copies the comment packet data into
the ogg stream state, but before you call theora_encode_tables(),
which overwrites op.packet with a new buffer, causing the leak.
</pre>
</blockquote>
Great ! It works ! :)<br>
Thank you very much Ralph.<br>
<br>
If I can suggest 2 small advices... <br>
- Include the _ogg_free line in encoder_example.c ...<br>
- I think it should useful to include in the theora source a small
example like the one I proposed.<br>
Smaller than encoder_example.c ... perhaps encoder_example2.c
which simply encode some programmatically generated images...<br>
<br>
</body>
</html>