changeset 1465:1dccf2603e1d libavformat

Better way to detect cluster (fix files encoded with Haali's muxer).
author aurel
date Wed, 08 Nov 2006 18:53:36 +0000
parents ca301b0f2c7d
children 340d1fe645d3
files matroska.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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