diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-04-13 01:16:15 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-04-13 01:16:15 +0000 |
commit | c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3 (patch) | |
tree | b8c2ff14310e1e659f509aeae0cf847608af2d5f /src/inputPlugins/oggflac_plugin.c | |
parent | dec6b1612e953c6029d963ff55d2b4a669b60f43 (diff) | |
download | mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.tar.gz mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.tar.xz mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.zip |
Stop passing our single OutputBuffer object everywhere
All of our main singleton data structures are implicitly shared,
so there's no reason to keep passing them around and around in
the stack and making our internal API harder to deal with.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7354 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/oggflac_plugin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inputPlugins/oggflac_plugin.c b/src/inputPlugins/oggflac_plugin.c index 070404e26..003b057d9 100644 --- a/src/inputPlugins/oggflac_plugin.c +++ b/src/inputPlugins/oggflac_plugin.c @@ -336,13 +336,13 @@ static unsigned int oggflac_try_decode(InputStream * inStream) return (ogg_stream_type_detect(inStream) == FLAC) ? 1 : 0; } -static int oggflac_decode(OutputBuffer * cb, InputStream * inStream) +static int oggflac_decode(InputStream * inStream) { OggFLAC__SeekableStreamDecoder *decoder = NULL; FlacData data; int ret = 0; - init_FlacData(&data, cb, inStream); + init_FlacData(&data, inStream); if (!(decoder = full_decoder_init_and_read_metadata(&data, 0))) { ret = -1; @@ -362,7 +362,7 @@ static int oggflac_decode(OutputBuffer * cb, InputStream * inStream) dc.audioFormat.sampleRate + 0.5; if (OggFLAC__seekable_stream_decoder_seek_absolute (decoder, sampleToSeek)) { - clearOutputBuffer(cb); + clearOutputBuffer(); data.time = ((float)sampleToSeek) / dc.audioFormat.sampleRate; data.position = 0; @@ -381,7 +381,7 @@ static int oggflac_decode(OutputBuffer * cb, InputStream * inStream) /* send last little bit */ if (data.chunk_length > 0 && !dc.stop) { flacSendChunk(&data); - flushOutputBuffer(data.cb); + flushOutputBuffer(); } fail: |