shithub: aacdec

Download patch

ref: de3ae8b40dea36ec825fd1b55b2e5968e711be9e
parent: 37d7acc5606f69a36e634c9a3f0f780d6bb57d75
author: Krzysztof Nikiel <knik@users.sourceforge.net>
date: Sat Sep 23 07:02:41 EDT 2017

unnest function for clang compatibility

--- a/frontend/mp4read.c
+++ b/frontend/mp4read.c
@@ -239,6 +239,23 @@
     return size;
 }
 
+
+static uint32_t getsize(void)
+{
+    int cnt;
+    uint32_t size = 0;
+    for (cnt = 0; cnt < 4; cnt++)
+    {
+        int tmp = u8in();
+
+        size <<= 7;
+        size |= (tmp & 0x7f);
+        if (!(tmp & 0x80))
+            break;
+    }
+    return size;
+}
+
 static int esdsin(int size)
 {
     // descriptor tree:
@@ -248,22 +265,6 @@
     //   MP4SLConfigDescriptor
     enum
     { TAG_ES = 3, TAG_DC = 4, TAG_DSI = 5, TAG_SLC = 6 };
-
-    uint32_t getsize(void)
-    {
-        int cnt;
-        uint32_t size = 0;
-        for (cnt = 0; cnt < 4; cnt++)
-        {
-            int tmp = u8in();
-
-            size <<= 7;
-            size |= (tmp & 0x7f);
-            if (!(tmp & 0x80))
-                break;
-        }
-        return size;
-    }
 
     // version/flags
     u32in();