summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-10-23 11:11:33 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-10-26 18:00:55 +0100
commit9b56d5c11488656254e9aed8d964ef2b7c2ff5e6 (patch)
tree83fe8dc6bd2410a174d214400dcf1dca290e7f49 /libavcodec/avpacket.c
parentd584533cf38141172e20bae5436629ee17c8ce50 (diff)
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/avpacket.c')
-rw-r--r--libavcodec/avpacket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index eaea061c54..cec5bf89c3 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -128,6 +128,8 @@ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
return 0;
}
+#if FF_API_AVPACKET_OLD_API
+FF_DISABLE_DEPRECATION_WARNINGS
#define ALLOC_MALLOC(data, size) data = av_malloc(size)
#define ALLOC_BUF(data, size) \
do { \
@@ -187,6 +189,8 @@ failed_alloc:
av_packet_unref(pkt);
return AVERROR(ENOMEM);
}
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
void av_packet_free_side_data(AVPacket *pkt)
{