[xiph-commits] r11049 - trunk/theora/lib
giles at svn.xiph.org
giles at svn.xiph.org
Wed Mar 22 14:49:18 PST 2006
Author: giles
Date: 2006-03-22 14:49:17 -0800 (Wed, 22 Mar 2006)
New Revision: 11049
Modified:
trunk/theora/lib/toplevel.c
Log:
Use _ogg_free instead of bare free for all our calls so malloc
replacement through libogg work correctly. Patch from Dmitry Krutskih.
Modified: trunk/theora/lib/toplevel.c
===================================================================
--- trunk/theora/lib/toplevel.c 2006-03-22 07:31:43 UTC (rev 11048)
+++ trunk/theora/lib/toplevel.c 2006-03-22 22:49:17 UTC (rev 11049)
@@ -227,13 +227,13 @@
theora_read(opb,8,&ret);
typeflag = ret;
if(!(typeflag&0x80)) {
- free(opb);
+ _ogg_free(opb);
return(OC_NOTFORMAT);
}
_tp_readbuffer(opb,id,6);
if(memcmp(id,"theora",6)) {
- free(opb);
+ _ogg_free(opb);
return(OC_NOTFORMAT);
}
@@ -241,43 +241,43 @@
case 0x80:
if(!op->b_o_s){
/* Not the initial packet */
- free(opb);
+ _ogg_free(opb);
return(OC_BADHEADER);
}
if(ci->version_major!=0){
/* previously initialized info header */
- free(opb);
+ _ogg_free(opb);
return OC_BADHEADER;
}
ret = _theora_unpack_info(ci,opb);
- free(opb);
+ _ogg_free(opb);
return(ret);
case 0x81:
if(ci->version_major==0){
/* um... we didn't get the initial header */
- free(opb);
+ _ogg_free(opb);
return(OC_BADHEADER);
}
ret = _theora_unpack_comment(cc,opb);
- free(opb);
+ _ogg_free(opb);
return(ret);
case 0x82:
if(ci->version_major==0 || cc->vendor==NULL){
/* um... we didn't get the initial header or comments yet */
- free(opb);
+ _ogg_free(opb);
return(OC_BADHEADER);
}
ret = _theora_unpack_tables(ci,opb);
- free(opb);
+ _ogg_free(opb);
return(ret);
default:
- free(opb);
+ _ogg_free(opb);
if(ci->version_major==0 || cc->vendor==NULL ||
((codec_setup_info *)ci->codec_setup)->HuffRoot[0]==NULL){
/* we haven't gotten the three required headers */
@@ -288,7 +288,7 @@
}
}
/* I don't think it's possible to get this far, but better safe.. */
- free(opb);
+ _ogg_free(opb);
return(OC_BADHEADER);
}
More information about the commits
mailing list