cog: Fix cog_virt_frame_new_convert_u8()
authorJonathan Rosser <jonathan.rosser@rd.bbc.co.uk>
Sun, 5 Sep 2010 22:34:13 +0000 (15:34 -0700)
committerDavid Schleef <ds@schleef.org>
Sun, 5 Sep 2010 22:37:17 +0000 (15:37 -0700)
Conversion was using uninitialized data instead of source frame.
Fixes #626425.

ext/cog/cogvirtframe.c

index 74336ca8cd3126a4213c2980bc870c42c098eedc..860dc8eac29762e45d164afdcd131eb55013d7b3 100644 (file)
@@ -1819,8 +1819,7 @@ convert_u8_s16 (CogFrame * frame, void *_dest, int component, int i)
   int16_t *src;
 
   src = cog_virt_frame_get_line (frame->virt_frame1, component, i);
-  orc_addc_convert_u8_s16 (dest, frame->virt_priv,
-      frame->components[component].width);
+  orc_addc_convert_u8_s16 (dest, src, frame->components[component].width);
 }
 
 CogFrame *
@@ -1834,7 +1833,6 @@ cog_virt_frame_new_convert_u8 (CogFrame * vf)
   virt_frame = cog_frame_new_virtual (NULL, format, vf->width, vf->height);
   virt_frame->virt_frame1 = vf;
   virt_frame->render_line = convert_u8_s16;
-  virt_frame->virt_priv = g_malloc (sizeof (int16_t) * vf->width);
 
   return virt_frame;
 }