[FFmpeg-devel] [PATCH 8/8] avidec: demux ASS and SRT tracks

Reimar Döffinger Reimar.Doeffinger
Thu Jul 22 19:04:48 CEST 2010


On Thu, Jul 22, 2010 at 12:39:51AM +0200, Aurelien Jacobs wrote:
> > > +        memmove(pkt->data, ptr, size);
> > 
> > Seems like a very inefficient way to do
> > pkt->data += pkt->size - size;
> 
> But this is a way that won't crash when doing av_free_packet(pkt).
> pkt->data points to av_malloced memory, so we don't want to loose this
> pointer.

But you memset it to 0 in the end anyway, that's why it seemed
pointless.
But even if I misunderstood that there should be a lot of simple
ways to avoid the memmove without a lot of effort.



More information about the ffmpeg-devel mailing list