summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2009-01-09 20:10:13 +0000
committerLuca Abeni <lucabe72@email.it>2009-01-09 20:10:13 +0000
commit65007a4fa029c04a7ef0fd8247c16b500de4a1c2 (patch)
treedb4ab318f1e8acc29c36ac478016bff239dc904c
parent1d6eeebe0803a37b51d4d10df4ec400300ba8bc3 (diff)
Do not assume that if pkt->destruct != av_destruct_packet then it is not
necessary to call the destruct method Originally committed as revision 16506 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 0afc63bb94..9c3acfb31c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -295,7 +295,7 @@ int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size)
int av_dup_packet(AVPacket *pkt)
{
- if (pkt->destruct != av_destruct_packet && pkt->data) {
+ if (((pkt->destruct == av_destruct_packet_nofree) || (pkt->destruct == NULL)) && pkt->data) {
uint8_t *data;
/* We duplicate the packet and don't forget to add the padding again. */
if((unsigned)pkt->size > (unsigned)pkt->size + FF_INPUT_BUFFER_PADDING_SIZE)