It is still used in comparisons to keep ABI compatibility.
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18431
9553f0bf-9b14-0410-a0b8-
cfaf0461ba5b
/* 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.
*/
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;
}
}
pkt->convergence_duration = 0;
pkt->flags = 0;
pkt->stream_index = 0;
- pkt->destruct= av_destruct_packet_nofree;
+ pkt->destruct= NULL;
}
int av_new_packet(AVPacket *pkt, int size)
pkt->pts = st->parser->pts;
pkt->dts = st->parser->dts;
pkt->pos = st->parser->pos;
- pkt->destruct = av_destruct_packet_nofree;
+ pkt->destruct = NULL;
compute_pkt_fields(s, st, st->parser, pkt);
if((s->iformat->flags & AVFMT_GENERIC_INDEX) && pkt->flags & PKT_FLAG_KEY){