[libav-commits] matroskadec: only return corrupt packets that actually contain data

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


Module: libav
Branch: master
Commit: bdb939ad730f1170ef0f57fb7a3c5686435af2d1

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

matroskadec: only return corrupt packets that actually contain data

Fixes bug 372.

---

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 0a35a87..442db23 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2195,7 +2195,7 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt)
         ret = matroska_parse_cluster(matroska);
     }
 
-    if (ret == AVERROR_INVALIDDATA) {
+    if (ret == AVERROR_INVALIDDATA && pkt->data) {
         pkt->flags |= AV_PKT_FLAG_CORRUPT;
         return 0;
     }



More information about the libav-commits mailing list