From 17e9cc84c5f94c94c71b2a808b57d4655ee21d12 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:07 +0200 Subject: added decoder_seek_where() and decoder_seek_error() Provide access to seeking for the decoder plugins; they have to know where to seek, and they need a way to tell us that seeking has failed. --- src/inputPlugins/aac_plugin.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/inputPlugins/aac_plugin.c') diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c index b3c72f5f1..178b4c608 100644 --- a/src/inputPlugins/aac_plugin.c +++ b/src/inputPlugins/aac_plugin.c @@ -389,10 +389,9 @@ static int aac_decode(struct decoder * mpd_decoder, char *path) decoder_data(mpd_decoder, NULL, 0, sampleBuffer, sampleBufferLen, file_time, bitRate, NULL); - if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) { - dc.seekError = 1; - decoder_command_finished(decoder); - } else if (decoder_get_command(decoder) == DECODE_COMMAND_STOP) + if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK) { + decoder_seek_error(mpd_decoder); + } else if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_STOP) break; } @@ -405,9 +404,8 @@ static int aac_decode(struct decoder * mpd_decoder, char *path) if (dc.state != DECODE_STATE_DECODE) return -1; - if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) { - dc.seekError = 1; - decoder_command_finished(decoder); + if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK) { + decoder_seek_error(mpd_decoder); } return 0; -- cgit v1.2.3