diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2010-06-11 17:16:43 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2010-06-11 17:16:43 +0000 |
commit | bddd1d93e55cce704048fbeededc20958815741e (patch) | |
tree | f88caad62f7ee2d642652c4c646dd29b9db437d1 | |
parent | 739178107c431e0d43ec38e9d86352940ee3d1dc (diff) | |
download | ffmpeg-bddd1d93e55cce704048fbeededc20958815741e.tar.gz |
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).
Originally committed as revision 23591 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 99c1cf0b5c..7995ce5906 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -657,7 +657,7 @@ static int ebml_read_binary(ByteIOContext *pb, int length, EbmlBin *bin) * 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 @@ static int ebml_parse_id(MatroskaDemuxContext *matroska, EbmlSyntax *syntax, 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); |