# HG changeset patch # User aurel # Date 1276276603 0 # Node ID f9967eb0abfd21f07b1be550f6cdd68c53be51af # Parent 72bfd56f9a185544347ad72308b3690ca1c38f69 matroskadec: fix type of the length field in ebml_read_master() Also use the correct value for unknown size (instead of a truncated and sign extended value). diff -r 72bfd56f9a18 -r f9967eb0abfd matroskadec.c --- a/matroskadec.c Fri Jun 11 16:45:38 2010 +0000 +++ b/matroskadec.c Fri Jun 11 17:16:43 2010 +0000 @@ -657,7 +657,7 @@ * are supposed to be sub-elements which can be read separately. * 0 is success, < 0 is failure. */ -static int ebml_read_master(MatroskaDemuxContext *matroska, int length) +static int ebml_read_master(MatroskaDemuxContext *matroska, uint64_t length) { ByteIOContext *pb = matroska->ctx->pb; MatroskaLevel *level; @@ -718,7 +718,7 @@ break; if (!syntax[i].id && id == MATROSKA_ID_CLUSTER && matroska->num_levels > 0 && - matroska->levels[matroska->num_levels-1].length == 0xffffffffffffffff) + 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) av_log(matroska->ctx, AV_LOG_INFO, "Unknown entry 0x%X\n", id);