diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-10-23 11:11:33 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-10-26 18:00:55 +0100 |
commit | 9b56d5c11488656254e9aed8d964ef2b7c2ff5e6 (patch) | |
tree | 83fe8dc6bd2410a174d214400dcf1dca290e7f49 /libavcodec/avcodec.h | |
parent | d584533cf38141172e20bae5436629ee17c8ce50 (diff) | |
download | ffmpeg-9b56d5c11488656254e9aed8d964ef2b7c2ff5e6.tar.gz |
avpacket: Deprecate av_dup_packet
As documented, `av_dup_packet` is broken by design, `av_packet_ref`
matches the AVFrame ref-counted API and can be safely used instead.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index dfd18ba866..9eaa2c6ffb 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3476,12 +3476,15 @@ int av_grow_packet(AVPacket *pkt, int grow_by); */ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size); +#if FF_API_AVPACKET_OLD_API /** * @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); -#if FF_API_AVPACKET_OLD_API /** * Free a packet. * |