[FFmpeg-cvslog] matroska: honor error_recognition on unknown doctypes
Luca Barbato
git at videolan.org
Thu Sep 20 04:44:42 CEST 2012
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Jul 12 13:38:50 2012 +0200| [cd4739c4f2d7ed56405f40dffe6254f6275e6e41] | committer: Luca Barbato
matroska: honor error_recognition on unknown doctypes
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd4739c4f2d7ed56405f40dffe6254f6275e6e41
---
libavformat/matroskadec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 7792b4c..95130fc 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1346,6 +1346,10 @@ static int matroska_read_header(AVFormatContext *s)
break;
if (i >= FF_ARRAY_ELEMS(matroska_doctypes)) {
av_log(s, AV_LOG_WARNING, "Unknown EBML doctype '%s'\n", ebml.doctype);
+ if (matroska->ctx->error_recognition & AV_EF_EXPLODE) {
+ ebml_free(ebml_syntax, &ebml);
+ return AVERROR_INVALIDDATA;
+ }
}
ebml_free(ebml_syntax, &ebml);
More information about the ffmpeg-cvslog
mailing list