diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2012-07-12 13:38:50 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-09-19 20:34:13 +0200 |
commit | cd4739c4f2d7ed56405f40dffe6254f6275e6e41 (patch) | |
tree | ceec1a58f0f2b2605a70fa4e67928fa5628ab333 /libavformat/matroskadec.c | |
parent | df6c3f9fb3b983e790f6d6d46c5fd26d757d9093 (diff) | |
download | ffmpeg-cd4739c4f2d7ed56405f40dffe6254f6275e6e41.tar.gz |
matroska: honor error_recognition on unknown doctypes
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 7792b4c52a..95130fc4df 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); |