It is broken by design, use `av_packet_ref` to keep additional references to an AVPacket. --- libavcodec/avcodec.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3d5af09..926c91b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3462,7 +3462,10 @@ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size); /** * @warning This is a hack - the packet memory allocation stuff is broken. The * packet is allocated if it was not really allocated. + * + * @deprecated Use av_packet_ref */ +attribute_deprecated int av_dup_packet(AVPacket *pkt); /** -- 2.5.0 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
