From: Luca Barbato Date: Mon, 30 Apr 2012 00:55:51 +0000 (-0700) Subject: mkv: mark corrupted packets and return them X-Git-Tag: android-x86-4.4-r1~8529^2~2140 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0ca4642ec520e315692c4a8b8a98ab390bddfad2;p=android-x86%2Fexternal-ffmpeg.git mkv: mark corrupted packets and return them Do return error if memory allocation or I/O fails. --- diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 5688658055..3b78ae3972 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2069,6 +2069,11 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt) ret = matroska_parse_cluster(matroska); } + if (ret == AVERROR_INVALIDDATA) { + pkt->flags |= AV_PKT_FLAG_CORRUPT; + return 0; + } + return ret; }