changeset 1900:55cc48bb357d libavformat

reindent after last commit
author aurel
date Sun, 11 Mar 2007 22:28:03 +0000
parents 1324ae790ee0
children 3f05dc37b4ec
files matroska.c
diffstat 1 files changed, 29 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Sun Mar 11 22:26:39 2007 +0000
+++ b/matroska.c	Sun Mar 11 22:28:03 2007 +0000
@@ -2701,40 +2701,40 @@
     /* Read stream until we have a packet queued. */
     while (matroska_deliver_packet(matroska, pkt)) {
 
-    /* Have we already reached the end? */
-    if (matroska->done)
-        return AVERROR_IO;
-
-    while (res == 0) {
-        if (!(id = ebml_peek_id(matroska, &matroska->level_up))) {
+        /* Have we already reached the end? */
+        if (matroska->done)
             return AVERROR_IO;
-        } else if (matroska->level_up) {
-            matroska->level_up--;
-            break;
-        }
-
-        switch (id) {
-            case MATROSKA_ID_CLUSTER:
-                if ((res = ebml_read_master(matroska, &id)) < 0)
+
+        while (res == 0) {
+            if (!(id = ebml_peek_id(matroska, &matroska->level_up))) {
+                return AVERROR_IO;
+            } else if (matroska->level_up) {
+                matroska->level_up--;
+                break;
+            }
+
+            switch (id) {
+                case MATROSKA_ID_CLUSTER:
+                    if ((res = ebml_read_master(matroska, &id)) < 0)
+                        break;
+                    if ((res = matroska_parse_cluster(matroska)) == 0)
+                        res = 1; /* Parsed one cluster, let's get out. */
                     break;
-                if ((res = matroska_parse_cluster(matroska)) == 0)
-                    res = 1; /* Parsed one cluster, let's get out. */
+
+                default:
+                case EBML_ID_VOID:
+                    res = ebml_read_skip(matroska);
+                    break;
+            }
+
+            if (matroska->level_up) {
+                matroska->level_up--;
                 break;
-
-            default:
-            case EBML_ID_VOID:
-                res = ebml_read_skip(matroska);
-                break;
+            }
         }
 
-        if (matroska->level_up) {
-            matroska->level_up--;
-            break;
-        }
-    }
-
-    if (res == -1)
-        matroska->done = 1;
+        if (res == -1)
+            matroska->done = 1;
     }
 
     return 0;