[xiph-commits] r14716 - trunk/theora/lib/enc
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Fri Apr 11 20:57:30 PDT 2008
Author: tterribe
Date: 2008-04-11 20:57:29 -0700 (Fri, 11 Apr 2008)
New Revision: 14716
Modified:
trunk/theora/lib/enc/encapiwrapper.c
Log:
Actually allocate a properly sized temporary buffer for non-4:2:0 modes, even
though the decoder doesn't support them.
Modified: trunk/theora/lib/enc/encapiwrapper.c
===================================================================
--- trunk/theora/lib/enc/encapiwrapper.c 2008-04-12 03:43:09 UTC (rev 14715)
+++ trunk/theora/lib/enc/encapiwrapper.c 2008-04-12 03:57:29 UTC (rev 14716)
@@ -95,9 +95,10 @@
}
else{
if(_info->frame_width>_info->pic_width||
- _info->frame_height>_info->pic_height){
- enc->buf=_ogg_malloc((3L*_info->frame_height*_info->frame_width>>1)*
- sizeof(*enc->buf));
+ _info->frame_height>_info->pic_height){
+ enc->buf=_ogg_malloc((_info->frame_width*_info->frame_height+
+ ((_info->frame_width>>!(_info->pixel_fmt&1))*
+ (_info->frame_height>>!(_info->pixel_fmt&2))<<1))*sizeof(*enc->buf));
}
else enc->buf=NULL;
memcpy(&enc->info,_info,sizeof(enc->info));
More information about the commits
mailing list