avidec : Free packet if dv_produce_packet fails.
authorJai Menon <jmenon86@gmail.com>
Sat, 17 Jul 2010 05:40:18 +0000 (05:40 +0000)
committerJai Menon <jmenon86@gmail.com>
Sat, 17 Jul 2010 05:40:18 +0000 (05:40 +0000)
Originally committed as revision 24281 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/avidec.c

index 058acd5..05cfd98 100644 (file)
@@ -808,6 +808,8 @@ resync:
                                     pkt->data, pkt->size);
             pkt->destruct = dstr;
             pkt->flags |= AV_PKT_FLAG_KEY;
+            if (size < 0)
+                av_free_packet(pkt);
         } else {
             /* XXX: How to handle B-frames in AVI? */
             pkt->dts = ast->frame_offset;