[FFmpeg-cvslog] mkv: mark corrupted packets and return them

Luca Barbato git at videolan.org
Mon Apr 30 22:46:08 CEST 2012


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sun Apr 29 17:55:51 2012 -0700| [0ca4642ec520e315692c4a8b8a98ab390bddfad2] | committer: Luca Barbato

mkv: mark corrupted packets and return them

Do return error if memory allocation or I/O fails.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ca4642ec520e315692c4a8b8a98ab390bddfad2
---

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 5688658..3b78ae3 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;
 }
 



More information about the ffmpeg-cvslog mailing list