aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/oggflac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:05 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:05 +0200
commit0d45870cea6836cd48e6953f4e67756b2502e22c (patch)
treeb869b8bdab13374f21347bd77a32661ddcf74b88 /src/inputPlugins/oggflac_plugin.c
parentea51f73285f4aca931c8c7f497838da573f89142 (diff)
downloadmpd-0d45870cea6836cd48e6953f4e67756b2502e22c.tar.gz
mpd-0d45870cea6836cd48e6953f4e67756b2502e22c.tar.xz
mpd-0d45870cea6836cd48e6953f4e67756b2502e22c.zip
added decoder_clear() and decoder_flush()
We are now beginning to remove direct structure accesses from the decoder plugins. decoder_clear() and decoder_flush() mask two very common buffer functions.
Diffstat (limited to 'src/inputPlugins/oggflac_plugin.c')
-rw-r--r--src/inputPlugins/oggflac_plugin.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/inputPlugins/oggflac_plugin.c b/src/inputPlugins/oggflac_plugin.c
index 91b4de435..b5e73e455 100644
--- a/src/inputPlugins/oggflac_plugin.c
+++ b/src/inputPlugins/oggflac_plugin.c
@@ -334,7 +334,6 @@ static unsigned int oggflac_try_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;
@@ -359,7 +358,7 @@ static int oggflac_decode(struct decoder * mpd_decoder, InputStream * inStream)
dc.audioFormat.sampleRate + 0.5;
if (OggFLAC__seekable_stream_decoder_seek_absolute
(decoder, sampleToSeek)) {
- ob_clear();
+ decoder_clear(mpd_decoder);
data.time = ((float)sampleToSeek) /
dc.audioFormat.sampleRate;
data.position = 0;
@@ -377,7 +376,7 @@ static int oggflac_decode(struct decoder * mpd_decoder, InputStream * inStream)
/* send last little bit */
if (data.chunk_length > 0 && dc.command != DECODE_COMMAND_STOP) {
flacSendChunk(&data);
- ob_flush();
+ decoder_flush(mpd_decoder);
}
fail: