aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/aac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:14 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:14 +0200
commit940ecf5345f339b9d3ec3e8029e345540358fa4c (patch)
treebe22d8c04732d41f1ba6f49298eef7829d097095 /src/inputPlugins/aac_plugin.c
parentd80260ab4e1d4f926344ab2074543ea4a7723216 (diff)
downloadmpd-940ecf5345f339b9d3ec3e8029e345540358fa4c.tar.gz
mpd-940ecf5345f339b9d3ec3e8029e345540358fa4c.tar.xz
mpd-940ecf5345f339b9d3ec3e8029e345540358fa4c.zip
added decoder_read()
On our way to stabilize the decoder API, we will one day remove the input stream functions. The most basic function, read() will be provided by decoder_api.h with this patch. It already contains a loop (still with manual polling), error/eof handling and decoder command checks. This kind of code used to be duplicated in all decoder plugins.
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/aac_plugin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/inputPlugins/aac_plugin.c b/src/inputPlugins/aac_plugin.c
index 0d4e5bfa4..f0796bb62 100644
--- a/src/inputPlugins/aac_plugin.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -65,11 +65,9 @@ static void fillAacBuffer(AacBuffer * b)
size_t rest = FAAD_MIN_STREAMSIZE * AAC_MAX_CHANNELS -
b->bytesIntoBuffer;
- bread = readFromInputStream(b->inStream,
- (void *)(b->buffer +
- b->
- bytesIntoBuffer),
- 1, rest);
+ bread = decoder_read(b->decoder, b->inStream,
+ (void *)(b->buffer + b->bytesIntoBuffer),
+ rest);
if (bread == 0 && inputStreamAtEOF(b->inStream))
b->atEof = 1;
b->bytesIntoBuffer += bread;