[theora] Cleaning app

Kostas Kostiadis kos at climaxgroup.com
Tue May 29 01:47:27 PDT 2007


> If you're mantaining a decoded frame queue, you need to copy the 
> referenced data, and then managing the copies is your responsibility.

You've hit the nail on the head there...I think that's were my problems are.
Thx for the info!

Cheers,
Kos
 

> -----Original Message-----
> From: Ralph Giles [mailto:giles at xiph.org] 
> Sent: 25 May 2007 18:54
> To: Kostas Kostiadis
> Cc: theora
> Subject: Re: [theora] Cleaning app
> 
> On Fri, May 25, 2007 at 11:39:19AM +0100, Kostas Kostiadis wrote:
> 
> > yuv_buffer yuv;
> > theora_decode_YUVout(&td,&yuv);
> > 
> > I'm guessing a bunch of stuff gets newed/malloced for 
> yuv.y, yuv.u, and
> > yuv.u.
> 
> theora_decode_YUVout() fills out the yuv_buffer to point to internal 
> storage inside td. So the pointers are only valid until the next call
> to theora_decode_packetin(). Freeing the memory is the library's 
> responsibility and happens when you call theora_clear().
> 
> If you're mantaining a decoded frame queue, you need to copy the 
> referenced data, and then managing the copies is your responsibility.
> 
> theora_encode_YUVin() copies the data you pass in. In this cast it's
> up to you to allocate/free the yuv.y, yuv.u and yuv.v buffers.
> 
>  -r
> 


More information about the theora mailing list