diff options
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r-- | libavcodec/avpacket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index e762a8782a..eaea061c54 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -184,7 +184,7 @@ int av_dup_packet(AVPacket *pkt) return 0; failed_alloc: - av_free_packet(pkt); + av_packet_unref(pkt); return AVERROR(ENOMEM); } @@ -197,6 +197,8 @@ void av_packet_free_side_data(AVPacket *pkt) pkt->side_data_elems = 0; } +#if FF_API_AVPACKET_OLD_API +FF_DISABLE_DEPRECATION_WARNINGS void av_free_packet(AVPacket *pkt) { if (pkt) { @@ -208,6 +210,8 @@ void av_free_packet(AVPacket *pkt) av_packet_free_side_data(pkt); } } +FF_ENABLE_DEPRECATION_WARNINGS +#endif uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size) |