[FFmpeg-devel] [PATCH] fix wc3 xan decoder

Michael Niedermayer michaelni
Sun Mar 2 00:11:42 CET 2008

On Sat, Mar 01, 2008 at 02:19:28PM -0800, Mike Melanson wrote:
> Michael Niedermayer wrote:
> > not in the patch, the patch works around it by setting data[0] to zero
> > dont copy it and it will be zero (from release_buffer)
> > 
> > That is i think your patch is a hack not a fix :)
> I have been looking at the problem some more. For this codec, I need to
> keep the previous frame data for MC. Right now, I have data structures
> for current and previous frames allocated as part of the codec's private
> structure. Should I turn those into structure pointers that are
> allocated and freed during _init() and _end() functions?

Thats an option.

A AVFrame pics[2]; could also be used to avoid the malloc/free.

but the simplest solution would be
FFSWAP(AVFrame, s->currentpic, s->lastpic);

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080302/45ef3418/attachment.pgp>

More information about the ffmpeg-devel mailing list