[libav-commits] lavf: zero data/size of the packet passed to read_packet().

Anton Khirnov git at libav.org
Fri Sep 21 10:12:53 CEST 2012


Module: libav
Branch: master
Commit: 1cc569dddadfedabe970ce7408dba7ddf381e98b

Author:    Anton Khirnov <anton at khirnov.net>
Committer: Anton Khirnov <anton at khirnov.net>
Date:      Thu Sep 20 20:00:39 2012 +0200

lavf: zero data/size of the packet passed to read_packet().

---

 libavformat/utils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 64be7c8..9dd58cc 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -671,6 +671,8 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
             }
         }
 
+        pkt->data = NULL;
+        pkt->size = 0;
         av_init_packet(pkt);
         ret= s->iformat->read_packet(s, pkt);
         if (ret < 0) {



More information about the libav-commits mailing list