aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/oggflac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:04 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:04 +0200
commit154aa496e8c18bba3dc10c607987c187f4686ae4 (patch)
tree32a2a35f74e823c5eea21bbfbebef1297fe6e989 /src/inputPlugins/oggflac_plugin.c
parent241cd043ca4f9dd560e6d947a9bf025f58de4ea9 (diff)
downloadmpd-154aa496e8c18bba3dc10c607987c187f4686ae4.tar.gz
mpd-154aa496e8c18bba3dc10c607987c187f4686ae4.tar.xz
mpd-154aa496e8c18bba3dc10c607987c187f4686ae4.zip
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.
Diffstat (limited to 'src/inputPlugins/oggflac_plugin.c')
-rw-r--r--src/inputPlugins/oggflac_plugin.c8
1 files changed, 5 insertions, 3 deletions
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;