[xiph-commits] r17284 - branches/theora-gumboot/lib

tterribe at svn.xiph.org tterribe at svn.xiph.org
Tue Jun 8 06:42:53 PDT 2010


Author: tterribe
Date: 2010-06-08 06:42:52 -0700 (Tue, 08 Jun 2010)
New Revision: 17284

Modified:
   branches/theora-gumboot/lib/internal.h
   branches/theora-gumboot/lib/state.c
Log:
Fix r17279 so it actually works.


Modified: branches/theora-gumboot/lib/internal.h
===================================================================
--- branches/theora-gumboot/lib/internal.h	2010-06-08 04:03:47 UTC (rev 17283)
+++ branches/theora-gumboot/lib/internal.h	2010-06-08 13:42:52 UTC (rev 17284)
@@ -367,6 +367,8 @@
   th_ycbcr_buffer     ref_frame_bufs[6];
   /*The storage for the reference frame buffers.*/
   unsigned char      *ref_frame_data[6];
+  /*The handle used to allocate the reference frame buffers.*/
+  unsigned char      *ref_frame_handle;
   /*The strides for each plane in the reference frames.*/
   int                 ref_ystride[3];
   /*The number of unique border patterns.*/

Modified: branches/theora-gumboot/lib/state.c
===================================================================
--- branches/theora-gumboot/lib/state.c	2010-06-08 04:03:47 UTC (rev 17283)
+++ branches/theora-gumboot/lib/state.c	2010-06-08 13:42:52 UTC (rev 17284)
@@ -544,11 +544,12 @@
     memcpy(_state->ref_frame_bufs[rfi],_state->ref_frame_bufs[0],
      sizeof(_state->ref_frame_bufs[0]));
   }
+  _state->ref_frame_handle=ref_frame_data;
   /*Set up the data pointers for the image buffers.*/
   for(rfi=0;rfi<_nrefs;rfi++){
-    _state->ref_frame_data[rfi]=ref_frame_data;
     align=-(ref_frame_data+yoffset-(unsigned char *)0)&15;
     ref_frame_data+=align;
+    _state->ref_frame_data[rfi]=ref_frame_data;
     _state->ref_frame_bufs[rfi][0].data=ref_frame_data+yoffset;
     ref_frame_data+=yplane_sz;
     align=-coffset&15;
@@ -604,7 +605,7 @@
 
 static void oc_state_ref_bufs_clear(oc_theora_state *_state){
   _ogg_free(_state->frag_buf_offs);
-  _ogg_free(_state->ref_frame_data[0]);
+  _ogg_free(_state->ref_frame_handle);
 }
 
 



More information about the commits mailing list