aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mp3_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/mp3_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/mp3_plugin.c')
-rw-r--r--src/inputPlugins/mp3_plugin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 399491d0e..9959f8601 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -853,7 +853,7 @@ static int mp3Read(mp3DecodeData * data, struct decoder *decoder,
case MUTEFRAME_SEEK:
if (dc.seekWhere <= data->elapsedTime) {
data->outputPtr = data->outputBuffer;
- ob_clear();
+ decoder_clear(decoder);
data->muteFrame = 0;
dc_command_finished();
}
@@ -963,7 +963,7 @@ static int mp3Read(mp3DecodeData * data, struct decoder *decoder,
data->frameOffset[j]) ==
0) {
data->outputPtr = data->outputBuffer;
- ob_clear();
+ decoder_clear(decoder);
data->currentFrame = j;
} else
dc.seekError = 1;
@@ -1081,11 +1081,11 @@ static int mp3_decode(struct decoder * decoder, InputStream * inStream)
if (dc.command == DECODE_COMMAND_SEEK &&
data.muteFrame == MUTEFRAME_SEEK) {
- ob_clear();
+ decoder_clear(decoder);
dc_command_finished();
}
- ob_flush();
+ decoder_flush(decoder);
mp3DecodeDataFinalize(&data);
return 0;