[FFmpeg-devel] Fwd: [PATCH] Psygnosis YOP demuxer
Sun Dec 27 22:54:08 CET 2009
On Mon, Dec 28, 2009 at 12:48:51AM +0530, Mohamed Naufal wrote:
> 2009/12/27 Reimar D?ffinger <Reimar.Doeffinger at gmx.de>
> > > + yop->stream ^= 1;
> > I think it might be better to do this without extra state, e.g. just
> > check if video_packet.buffer is != NULL?
> Did you mean video_packet.data? If so, I don't understand how it can be done
> since data isn't freed after each read.
> Could you please elaborate?
you should not keep a copy of the packet once its returned
its not "your" packet anymore at this point and this just leads to a
memleak and double free
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel