Mercurial > libavcodec.hg
diff avcodec.h @ 9394:d322325fc00e libavcodec
Get rid of av_destruct_packet_nofree and use NULL instead.
It is still used in comparisons to keep ABI compatibility.
author | reimar |
---|---|
date | Sat, 11 Apr 2009 12:42:29 +0000 |
parents | 66e270967340 |
children | e6ade5c8a750 |
line wrap: on
line diff
--- a/avcodec.h Sat Apr 11 11:47:15 2009 +0000 +++ b/avcodec.h Sat Apr 11 12:42:29 2009 +0000 @@ -2630,7 +2630,10 @@ /* packet functions */ -void av_destruct_packet_nofree(AVPacket *pkt); +/** + * @deprecated use NULL instead + */ +attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt); /** * Default packet destructor. @@ -2675,8 +2678,9 @@ */ static inline void av_free_packet(AVPacket *pkt) { - if (pkt && pkt->destruct) { - pkt->destruct(pkt); + if (pkt) { + if (pkt->destruct) pkt->destruct(pkt); + pkt->data = NULL; pkt->size = 0; } }