]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Do not assume that if pkt->destruct != av_destruct_packet then it is not
authorlucabe <lucabe@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 9 Jan 2009 20:10:13 +0000 (20:10 +0000)
committerlucabe <lucabe@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 9 Jan 2009 20:10:13 +0000 (20:10 +0000)
necessary to call the destruct method

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16506 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/utils.c

index 0afc63bb9489bc076fbbcec85aa0c15af8135b4b..9c3acfb31c8403a582ee3ce62c9935a5ab02d538 100644 (file)
@@ -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)