On 06/29/2012 07:01 AM, Anton Khirnov wrote: > > On Thu, 28 Jun 2012 21:12:55 +0200, Luca Barbato <[email protected]> wrote: >> We do not memcpy the avpacket buffer even if we do change it, >> completely steal the buffer by resetting the avpacket. >> > > I really do not like this. A memcpy would be better IMO, even with the > performance drop.
I know, but I want to discuss. >> This will prevent unexpected results due reuse or unexpected failures >> due early calls to av_free_packet. >> --- >> >> The alternative of freeing the packet after the frame gives us possible >> double >> free issues I'm afraid. >> > You're forgetting that the frame _data_ is supposed to be freed by the > decoder, not the user. Ok, so it can be not freed by the decoder. lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
