1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

matroskadec: honor error_recognition when encountering unknown elements.

This commit is contained in:
Anton Khirnov 2012-07-07 17:15:27 +02:00
parent 6410397600
commit 5b7a88f0ba

View File

@ -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);
}