aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-04 17:05:02 +0100
committerMax Kellermann <max@duempel.org>2008-11-04 17:05:02 +0100
commit290347c482c3af3dd842132b33f28e6a1f6ff12f (patch)
tree64e6c62446426dae451d300bef4d5883ceabb311 /src/decoder
parent9ecfc57c3ae9a1635ec51aa6a5d2f13d9f98185c (diff)
downloadmpd-290347c482c3af3dd842132b33f28e6a1f6ff12f.tar.gz
mpd-290347c482c3af3dd842132b33f28e6a1f6ff12f.tar.xz
mpd-290347c482c3af3dd842132b33f28e6a1f6ff12f.zip
mp4: use decoder_read() instead of input_stream_read()
decoder_read() handles decoder commands, and should be used in decoder plugins.
Diffstat (limited to '')
-rw-r--r--src/decoder/mp4_plugin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/decoder/mp4_plugin.c b/src/decoder/mp4_plugin.c
index 996c19fdf..eb6580d0b 100644
--- a/src/decoder/mp4_plugin.c
+++ b/src/decoder/mp4_plugin.c
@@ -29,6 +29,7 @@
/* all code here is either based on or copied from FAAD2's frontend code */
struct mp4_context {
+ struct decoder *decoder;
struct input_stream *input_stream;
};
@@ -77,7 +78,7 @@ mp4_read(void *user_data, void *buffer, uint32_t length)
{
struct mp4_context *ctx = user_data;
- return input_stream_read(ctx->input_stream, buffer, length);
+ return decoder_read(ctx->decoder, ctx->input_stream, buffer, length);
}
static uint32_t
@@ -93,6 +94,7 @@ static bool
mp4_decode(struct decoder *mpd_decoder, struct input_stream *input_stream)
{
struct mp4_context ctx = {
+ .decoder = mpd_decoder,
.input_stream = input_stream,
};
mp4ff_callback_t callback = {
@@ -313,6 +315,7 @@ mp4_load_tag(const char *file)
struct tag *ret = NULL;
struct input_stream input_stream;
struct mp4_context ctx = {
+ .decoder = NULL,
.input_stream = &input_stream,
};
mp4ff_callback_t callback = {