From 154aa496e8c18bba3dc10c607987c187f4686ae4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:04 +0200 Subject: added struct decoder The decoder struct should later be made opaque to the decoder plugin, because maintaining a stable struct ABI is quite difficult. The ABI should only consist of a small number of stable functions. --- src/inputPlugins/oggflac_plugin.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/inputPlugins/oggflac_plugin.c') diff --git a/src/inputPlugins/oggflac_plugin.c b/src/inputPlugins/oggflac_plugin.c index 552b550be..a365f73cc 100644 --- a/src/inputPlugins/oggflac_plugin.c +++ b/src/inputPlugins/oggflac_plugin.c @@ -314,7 +314,7 @@ static MpdTag *oggflac_TagDup(char *file) return NULL; } - init_FlacData(&data, &inStream); + init_FlacData(&data, NULL, &inStream); /* errors here won't matter, * data.tag will be set or unset, that's all we care about */ @@ -331,13 +331,15 @@ static unsigned int oggflac_try_decode(InputStream * inStream) return (ogg_stream_type_detect(inStream) == FLAC) ? 1 : 0; } -static int oggflac_decode(InputStream * inStream) +static int oggflac_decode(struct decoder * mpd_decoder, InputStream * inStream) { + DecoderControl *dc = mpd_decoder->dc; + OutputBuffer *ob = mpd_decoder->ob; OggFLAC__SeekableStreamDecoder *decoder = NULL; FlacData data; int ret = 0; - init_FlacData(&data, inStream); + init_FlacData(&data, mpd_decoder, inStream); if (!(decoder = full_decoder_init_and_read_metadata(&data, 0))) { ret = -1; -- cgit v1.2.3