aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ogg_codec.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-09-04 13:05:12 +0200
committerMax Kellermann <max@duempel.org>2012-09-04 13:05:12 +0200
commitebf481e1a1d129f8ce9109ea97a77e5a55da128e (patch)
treef12d721c49cae61b92ab228df83a17d949a6fd1c /src/decoder/ogg_codec.c
parent5a52e9135087e1e28ef7f5a4e5282fec439fe866 (diff)
downloadmpd-ebf481e1a1d129f8ce9109ea97a77e5a55da128e.tar.gz
mpd-ebf481e1a1d129f8ce9109ea97a77e5a55da128e.tar.xz
mpd-ebf481e1a1d129f8ce9109ea97a77e5a55da128e.zip
decoder/ogg_common: rename to ogg_codec.c
Diffstat (limited to '')
-rw-r--r--src/decoder/ogg_codec.c (renamed from src/decoder/ogg_common.c)12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/ogg_common.c b/src/decoder/ogg_codec.c
index f63bc094b..7d05db8e7 100644
--- a/src/decoder/ogg_common.c
+++ b/src/decoder/ogg_codec.c
@@ -22,10 +22,10 @@
*/
#include "config.h"
-#include "ogg_common.h"
+#include "ogg_codec.h"
-enum ogg_stream_type
-ogg_stream_type_detect(struct decoder *decoder, struct input_stream *is)
+enum ogg_codec
+ogg_codec_detect(struct decoder *decoder, struct input_stream *is)
{
/* oggflac detection based on code in ogg123 and this post
* http://lists.xiph.org/pipermail/flac/2004-December/000393.html
@@ -33,13 +33,13 @@ ogg_stream_type_detect(struct decoder *decoder, struct input_stream *is)
unsigned char buf[41];
size_t r = decoder_read(decoder, is, buf, sizeof(buf));
if (r < sizeof(buf) || memcmp(buf, "OggS", 4) != 0)
- return VORBIS;
+ return OGG_CODEC_VORBIS;
if ((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 OGG_CODEC_FLAC;
- return VORBIS;
+ return OGG_CODEC_VORBIS;
}