[xiph-commits] r13602 - trunk/theora/lib/enc
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Thu Aug 23 15:52:05 PDT 2007
Author: tterribe
Date: 2007-08-23 15:52:05 -0700 (Thu, 23 Aug 2007)
New Revision: 13602
Modified:
trunk/theora/lib/enc/encoder_toplevel.c
Log:
Clear the i pointer along with the rest of the struct in theora_encode_clear(),
so that a second call to theora_clear() won't segfault.
Modified: trunk/theora/lib/enc/encoder_toplevel.c
===================================================================
--- trunk/theora/lib/enc/encoder_toplevel.c 2007-08-23 20:18:36 UTC (rev 13601)
+++ trunk/theora/lib/enc/encoder_toplevel.c 2007-08-23 22:52:05 UTC (rev 13602)
@@ -1332,7 +1332,7 @@
CP_INSTANCE *cpi;
cpi=(CP_INSTANCE *)th->internal_encode;
if(cpi){
-
+
ClearHuffmanSet(&cpi->pb);
ClearFragmentInfo(&cpi->pb);
ClearFrameInfo(&cpi->pb);
@@ -1340,12 +1340,12 @@
EClearFrameInfo(cpi);
ClearTmpBuffers(&cpi->pb);
ClearPPInstance(&cpi->pp);
-
+
oggpackB_writeclear(cpi->oggbuffer);
_ogg_free(cpi->oggbuffer);
_ogg_free(cpi);
}
- th->internal_encode=NULL;
+ memset(th,0,sizeof(*th));
}
/* returns, in seconds, absolute time of current packet in given
More information about the commits
mailing list