[xiph-commits] r17780 - trunk/theora/lib

tterribe at svn.xiph.org tterribe at svn.xiph.org
Fri Jan 14 18:01:47 PST 2011


Author: tterribe
Date: 2011-01-14 18:01:47 -0800 (Fri, 14 Jan 2011)
New Revision: 17780

Modified:
   trunk/theora/lib/decode.c
Log:
The yoffset calculation in oc_dec_init_dummy_frame was incorrect.

This was only used when a stream started without a keyframe, and was
 initializing the wrong region of memory.
This was harmless (the region it initialized was still safely
 allocated, it just didn't cover all of the frame we wanted to use
 as a reference frame), but lead to unpredictable results and
 valgrind errors.
See https://bugzilla.mozilla.org/show_bug.cgi?id=625773


Modified: trunk/theora/lib/decode.c
===================================================================
--- trunk/theora/lib/decode.c	2011-01-13 00:13:10 UTC (rev 17779)
+++ trunk/theora/lib/decode.c	2011-01-15 02:01:47 UTC (rev 17780)
@@ -2077,8 +2077,7 @@
   cheight=yheight>>!(info->pixel_fmt&2);
   yplane_sz=yhstride*(size_t)yheight+16;
   cplane_sz=chstride*(size_t)cheight;
-  yoffset=_dec->state.ref_ystride[0]*(yheight-1)-
-   (OC_UMV_PADDING+OC_UMV_PADDING*(ptrdiff_t)yhstride);
+  yoffset=yhstride*(ptrdiff_t)(yheight-OC_UMV_PADDING-1)+OC_UMV_PADDING;
   memset(_dec->state.ref_frame_data[0]-yoffset,0x80,yplane_sz+2*cplane_sz);
 }
 



More information about the commits mailing list