diff options
author | Max Kellermann <max@duempel.org> | 2008-10-29 17:28:47 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-29 17:28:47 +0100 |
commit | be90199c5ace71eb3411294159fec6adcc0d4404 (patch) | |
tree | aac2bed6180a800b9270427a1242ba356aed8ff3 /src/decoder_api.c | |
parent | d6c4441c785d5ae41feba865727fd7ecdfbad361 (diff) | |
download | mpd-be90199c5ace71eb3411294159fec6adcc0d4404.tar.gz mpd-be90199c5ace71eb3411294159fec6adcc0d4404.tar.xz mpd-be90199c5ace71eb3411294159fec6adcc0d4404.zip |
decoder_api: removed decoder_clear()
Call ob_clear() in decoder_command_finished() instead of implementing
that call in every decoder plugin.
Diffstat (limited to 'src/decoder_api.c')
-rw-r--r-- | src/decoder_api.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c index a82b6c162..6d38685f4 100644 --- a/src/decoder_api.c +++ b/src/decoder_api.c @@ -77,6 +77,10 @@ void decoder_command_finished(mpd_unused struct decoder * decoder) assert(dc.command != DECODE_COMMAND_SEEK || dc.seekError || decoder->seeking); + if (dc.command == DECODE_COMMAND_SEEK) + /* delete frames from the old song position */ + ob_clear(); + dc.command = DECODE_COMMAND_NONE; notify_signal(&pc.notify); } @@ -209,8 +213,3 @@ void decoder_flush(mpd_unused struct decoder *decoder) { ob_flush(); } - -void decoder_clear(mpd_unused struct decoder *decoder) -{ - ob_clear(); -} |