aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ogg_common.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-09-04 12:49:02 +0200
committerMax Kellermann <max@duempel.org>2012-09-04 12:49:02 +0200
commit5a52e9135087e1e28ef7f5a4e5282fec439fe866 (patch)
treec4d5f4ca39652594fef5111ceca9cb8cdd0b6e4b /src/decoder/ogg_common.c
parent18e458154a25d41b2b18862d18f417e6e8e74d6b (diff)
downloadmpd-5a52e9135087e1e28ef7f5a4e5282fec439fe866.tar.gz
mpd-5a52e9135087e1e28ef7f5a4e5282fec439fe866.tar.xz
mpd-5a52e9135087e1e28ef7f5a4e5282fec439fe866.zip
decoder/ogg_common: pass decoder to _type_detect()
Allow the function to be cancelled.
Diffstat (limited to 'src/decoder/ogg_common.c')
-rw-r--r--src/decoder/ogg_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/ogg_common.c b/src/decoder/ogg_common.c
index ba1a8edea..f63bc094b 100644
--- a/src/decoder/ogg_common.c
+++ b/src/decoder/ogg_common.c
@@ -25,13 +25,13 @@
#include "ogg_common.h"
enum ogg_stream_type
-ogg_stream_type_detect(struct input_stream *is)
+ogg_stream_type_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
* ogg123 trunk still doesn't have this patch as of June 2005 */
unsigned char buf[41];
- size_t r = decoder_read(NULL, is, buf, sizeof(buf));
+ size_t r = decoder_read(decoder, is, buf, sizeof(buf));
if (r < sizeof(buf) || memcmp(buf, "OggS", 4) != 0)
return VORBIS;