# HG changeset patch # User aurel # Date 1163012016 0 # Node ID 1dccf2603e1dc6eb356c8090de52dadb66b160bb # Parent ca301b0f2c7d1f4769b48d511822c6ac8aa10ae9 Better way to detect cluster (fix files encoded with Haali's muxer). diff -r ca301b0f2c7d -r 1dccf2603e1d matroska.c --- a/matroska.c Wed Nov 08 10:48:15 2006 +0000 +++ b/matroska.c Wed Nov 08 18:53:36 2006 +0000 @@ -2143,11 +2143,8 @@ } } - if (res < 0) - return res; - /* Have we found a cluster? */ - if (res == 1) { + if (ebml_peek_id(matroska, NULL) == MATROSKA_ID_CLUSTER) { int i, j; MatroskaTrack *track; AVStream *st; @@ -2264,9 +2261,10 @@ /* What do we do with private data? E.g. for Vorbis. */ } + res = 0; } - return 0; + return res; } static int