On mer, mag 07, 2014 at 01:37:16 +0200, Luca Barbato wrote:
> On 07/05/14 00:37, Alessandro Ghedini wrote:
> > Hi,
> >
> > I've been working on merging the GIF encoder from ffmpeg, since libav's
> > doesn't
> > seem to work very well (in my tests anyway), and my initial approach has
> > been to
> > simply copy/paste lavc/gif.{c,h} and lavf/gif.c, make them compile and see
> > how
> > it goes (I'm using libav.git).
> >
> > While I've been able to compile the whole thing (with a little bit of work,
> > due
> > to missing av_copy_packet() and ff_alloc_packet2()),
>
> av_copy_packet in a muxer sounds strange, in libav we do not have such
> function since avpackets are refcounted.I've tried to replace av_copy_packet() with av_packet_ref() but it doesn't seem to work (I get a whole bunch of "free(): invalid pointer" errors). The packet copying was added in commit a7c5b7a6 to "correct the delay after the first frame", which is needed for "low frame rate and large scene change". I guess we could do without it, but those use cases won't work with libav. > ff_alloc_packet2 from what I can recall keeps 1 packet cache in > avcodeccontext, but then if you always copy/duplicate the avpacket > produced it gets a little pointless having it, even worse if you have mt > encoders. I simply replaced it with ff_alloc_packet(). Not sure if that's ok though, and maybe it has something to do with ffmpeg's gif encoder not working in libav. Cheers
signature.asc
Description: Digital signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
