changeset 2197:94d11eaef9bf libavformat

whitespace cosmetics
author mru
date Sun, 24 Jun 2007 12:20:17 +0000
parents 5864dc9a9741
children 7c13baaa4f87
files oggparsevorbis.c
diffstat 1 files changed, 24 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/oggparsevorbis.c	Sun Jun 24 12:20:16 2007 +0000
+++ b/oggparsevorbis.c	Sun Jun 24 12:20:17 2007 +0000
@@ -30,7 +30,7 @@
 #include "avstring.h"
 
 extern int
-vorbis_comment (AVFormatContext * as, uint8_t *buf, int size)
+vorbis_comment(AVFormatContext * as, uint8_t *buf, int size)
 {
     char *p = buf;
     int s, n, j;
@@ -52,7 +52,7 @@
     p += 4;
     size -= 4;
 
-    while (size >= 4){
+    while (size >= 4) {
         char *t, *v;
         int tl, vl;
 
@@ -68,7 +68,7 @@
         size -= s;
         n--;
 
-        v = memchr (t, '=', s);
+        v = memchr(t, '=', s);
         if (!v)
             continue;
 
@@ -76,30 +76,30 @@
         vl = s - tl - 1;
         v++;
 
-        if (tl && vl){
+        if (tl && vl) {
             char tt[tl + 1];
             char ct[vl + 1];
 
             for (j = 0; j < tl; j++)
-                tt[j] = toupper (t[j]);
+                tt[j] = toupper(t[j]);
             tt[tl] = 0;
 
-            memcpy (ct, v, vl);
+            memcpy(ct, v, vl);
             ct[vl] = 0;
 
             // took from Vorbis_I_spec
-            if (!strcmp (tt, "AUTHOR") || !strcmp(tt, "ARTIST"))
-                av_strlcpy (as->author, ct, sizeof (as->author));
-            else if (!strcmp (tt, "TITLE"))
-                av_strlcpy (as->title, ct, sizeof (as->title));
-            else if (!strcmp (tt, "COPYRIGHT"))
-                av_strlcpy (as->copyright, ct, sizeof (as->copyright));
-            else if (!strcmp (tt, "DESCRIPTION"))
-                av_strlcpy (as->comment, ct, sizeof (as->comment));
-            else if (!strcmp (tt, "GENRE"))
-                av_strlcpy (as->genre, ct, sizeof (as->genre));
-            else if (!strcmp (tt, "TRACKNUMBER"))
-                as->track = atoi (ct);
+            if (!strcmp(tt, "AUTHOR") || !strcmp(tt, "ARTIST"))
+                av_strlcpy(as->author, ct, sizeof(as->author));
+            else if (!strcmp(tt, "TITLE"))
+                av_strlcpy(as->title, ct, sizeof(as->title));
+            else if (!strcmp(tt, "COPYRIGHT"))
+                av_strlcpy(as->copyright, ct, sizeof(as->copyright));
+            else if (!strcmp(tt, "DESCRIPTION"))
+                av_strlcpy(as->comment, ct, sizeof(as->comment));
+            else if (!strcmp(tt, "GENRE"))
+                av_strlcpy(as->genre, ct, sizeof(as->genre));
+            else if (!strcmp(tt, "TRACKNUMBER"))
+                as->track = atoi(ct);
             else if (!strcmp(tt, "ALBUM"))
                 av_strlcpy(as->album, ct, sizeof(as->album));
             else if (!strcmp(tt, "GENRE"))
@@ -110,10 +110,10 @@
     }
 
     if (size > 0)
-        av_log (as, AV_LOG_INFO, "%i bytes of comment header remain\n", size);
+        av_log(as, AV_LOG_INFO, "%i bytes of comment header remain\n", size);
     if (n > 0)
-        av_log (as, AV_LOG_INFO,
-                "truncated comment header, %i comments not found\n", n);
+        av_log(as, AV_LOG_INFO,
+               "truncated comment header, %i comments not found\n", n);
 
     return 0;
 }
@@ -152,7 +152,7 @@
     offset = 1;
     offset += av_xiphlacing(&ptr[offset], priv->len[0]);
     offset += av_xiphlacing(&ptr[offset], priv->len[1]);
-    for(i = 0; i < 3; i++) {
+    for (i = 0; i < 3; i++) {
         memcpy(&ptr[offset], priv->packet[i], priv->len[i]);
         offset += priv->len[i];
     }
@@ -172,9 +172,9 @@
     if (os->seq > 2)
         return 0;
 
-    if(os->seq == 0) {
+    if (os->seq == 0) {
         os->private = av_mallocz(sizeof(oggvorbis_private_t));
-        if(!os->private)
+        if (!os->private)
             return 0;
     }