diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-07 17:15:27 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-09 07:43:11 +0200 |
commit | 5b7a88f0ba160ce9ba9f625dd1a777a66244c089 (patch) | |
tree | 12581b9d189e6f45ad5f4cfa444527455b8ddda1 /libavformat/matroskadec.c | |
parent | 6410397600eae3bd447c0ec2667cc53722ab84ee (diff) | |
download | ffmpeg-5b7a88f0ba160ce9ba9f625dd1a777a66244c089.tar.gz |
matroskadec: honor error_recognition when encountering unknown elements.
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 3b78ae3972..40c2eb10dd 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -783,8 +783,11 @@ static int ebml_parse_id(MatroskaDemuxContext *matroska, EbmlSyntax *syntax, matroska->num_levels > 0 && matroska->levels[matroska->num_levels-1].length == 0xffffffffffffff) return 0; // we reached the end of an unknown size cluster - if (!syntax[i].id && id != EBML_ID_VOID && id != EBML_ID_CRC32) + if (!syntax[i].id && id != EBML_ID_VOID && id != EBML_ID_CRC32) { av_log(matroska->ctx, AV_LOG_INFO, "Unknown entry 0x%X\n", id); + if (matroska->ctx->error_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; + } return ebml_parse_elem(matroska, &syntax[i], data); } |