aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/_ogg_common.c
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2006-07-20 16:02:40 +0000
committerAvuton Olrich <avuton@gmail.com>2006-07-20 16:02:40 +0000
commit29a25b9933b32800f58dd73d5d1fc21993071c92 (patch)
tree4f456a6f8e44d42acc289c35534ea3e59c0aa96f /src/inputPlugins/_ogg_common.c
parent099f0e103f7591eef81183292d704b3a77a99018 (diff)
downloadmpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.gz
mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.xz
mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.zip
Add mpd-indent.sh
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputPlugins/_ogg_common.c')
-rw-r--r--src/inputPlugins/_ogg_common.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/inputPlugins/_ogg_common.c b/src/inputPlugins/_ogg_common.c
index 1f1012cd3..62a147972 100644
--- a/src/inputPlugins/_ogg_common.c
+++ b/src/inputPlugins/_ogg_common.c
@@ -37,29 +37,37 @@ ogg_stream_type ogg_stream_type_detect(InputStream * inStream)
size_t r, to_read = 41;
seekInputStream(inStream, 0, SEEK_SET);
-
+
while (to_read) {
r = readFromInputStream(inStream, buf, 1, to_read);
if (r < 0)
break;
to_read -= r;
- if (!r && !inputStreamAtEOF(inStream))
+ if (!r && !inputStreamAtEOF(inStream))
my_usleep(10000);
else
break;
}
-
+
seekInputStream(inStream, 0, SEEK_SET);
-
- if (r >= 32 && memcmp(buf, "OggS", 4) == 0 && (
- (memcmp(buf+29, "FLAC", 4) == 0
- && memcmp(buf+37, "fLaC", 4) == 0)
- || (memcmp(buf+28, "FLAC", 4) == 0)
- || (memcmp(buf+28, "fLaC", 4) == 0))) {
+
+ if (r >= 32 && memcmp(buf, "OggS", 4) == 0 && ((memcmp
+ (buf + 29, "FLAC",
+ 4) == 0
+ && memcmp(buf + 37,
+ "fLaC",
+ 4) == 0)
+ ||
+ (memcmp
+ (buf + 28, "FLAC",
+ 4) == 0)
+ ||
+ (memcmp
+ (buf + 28, "fLaC",
+ 4) == 0))) {
return FLAC;
}
return VORBIS;
}
-#endif /* defined(HAVE_OGGFLAC || defined(HAVE_OGGVORBIS) */
-
+#endif /* defined(HAVE_OGGFLAC || defined(HAVE_OGGVORBIS) */