[FFmpeg-devel] On obfuscated nature of public(!) API call av_dup_packet()

Anton Khirnov anton at khirnov.net
Sat Sep 15 12:50:15 CEST 2012

On Sat, 15 Sep 2012 13:35:37 +0300, Andrey Utkin <andrey.krieger.utkin at gmail.com> wrote:
> 2012/9/15 Anton Khirnov <anton at khirnov.net>:
> > The thing is, this function is horribly named. It is not 'duplicate
> > supplied packet'.  It is 'ensure that supplied packet is backed by
> > malloced storage and thus will remain valid until the caller frees it'.
> > It does so by duplicating the packet payload when the free callback is
> > NULL.
> Then what about adding a function to mean "duplicate supplied packet"?

Feel free to add it if you think it's useful.

Anton Khirnov

More information about the ffmpeg-devel mailing list