diff options
author | Måns Rullgård <mans@mansr.com> | 2007-06-24 12:20:17 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2007-06-24 12:20:17 +0000 |
commit | 4bd684bc2f11e13cf8d7b5bc5d90543adba0c188 (patch) | |
tree | c8b57b3b16706bee4a3f1d40a4183a1e3c444246 /libavformat/oggparsevorbis.c | |
parent | 1eb1f6fdb85cfe53a452f37c2dc636740637b5ae (diff) | |
download | ffmpeg-4bd684bc2f11e13cf8d7b5bc5d90543adba0c188.tar.gz |
whitespace cosmetics
Originally committed as revision 9410 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r-- | libavformat/oggparsevorbis.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index b4d03bd85c..7231732328 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -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 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size) p += 4; size -= 4; - while (size >= 4){ + while (size >= 4) { char *t, *v; int tl, vl; @@ -68,7 +68,7 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size) size -= s; n--; - v = memchr (t, '=', s); + v = memchr(t, '=', s); if (!v) continue; @@ -76,30 +76,30 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size) 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 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size) } 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 @@ fixup_vorbis_headers(AVFormatContext * as, oggvorbis_private_t *priv, 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 @@ vorbis_header (AVFormatContext * s, int idx) 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; } |