matroskadec: invert a test
authorAurelien Jacobs <aurel@gnuage.org>
Tue, 5 Aug 2008 00:40:46 +0000 (00:40 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Tue, 5 Aug 2008 00:40:46 +0000 (00:40 +0000)
Originally committed as revision 14567 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroskadec.c

index 6b1ff97d503bbff11935b15e3b70ab976d9c0478..abd8cc22374e6c7d10ae7670931e8ca7c68c8919 100644 (file)
@@ -1638,7 +1638,10 @@ matroska_read_header (AVFormatContext    *s,
     matroska_execute_seekhead(matroska);
 
     /* Have we found a cluster? */
-    if (ebml_peek_id(matroska, NULL) == MATROSKA_ID_CLUSTER) {
+    if (ebml_peek_id(matroska, NULL) != MATROSKA_ID_CLUSTER)
+        return -1;
+
+    {
         MatroskaTrack *tracks = matroska->tracks.elem;
         int i, j;
         AVStream *st;