summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f500151e85..cb64d82f93 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2630,7 +2630,10 @@ typedef struct AVSubtitle {
/* 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 @@ int av_dup_packet(AVPacket *pkt);
*/
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;
}
}