diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:07 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:07 +0200 |
commit | 817a68b2b27dc65fb5fc550c83117832e8048c6f (patch) | |
tree | 324fed7254ab6d8c64bf5736049ab50ce558af5f /src/inputPlugins/mp4_plugin.c | |
parent | 2e9169de9d859fd5d5629a4d1b3789155a5dac62 (diff) | |
download | mpd-817a68b2b27dc65fb5fc550c83117832e8048c6f.tar.gz mpd-817a68b2b27dc65fb5fc550c83117832e8048c6f.tar.xz mpd-817a68b2b27dc65fb5fc550c83117832e8048c6f.zip |
added decoder_get_command()
Another big patch which hides internal mpd APIs from decoder plugins:
decoder plugins regularly poll dc->command; expose it with a
decoder_api.h function.
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/mp4_plugin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inputPlugins/mp4_plugin.c b/src/inputPlugins/mp4_plugin.c index 4ffe4658f..91bf68e02 100644 --- a/src/inputPlugins/mp4_plugin.c +++ b/src/inputPlugins/mp4_plugin.c @@ -178,7 +178,7 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream) seekTable = xmalloc(sizeof(float) * numSamples); for (sampleId = 0; sampleId < numSamples; sampleId++) { - if (dc.command == DECODE_COMMAND_SEEK) + if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK) seeking = 1; if (seeking && seekTableEnd > 1 && @@ -270,7 +270,7 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream) decoder_data(mpd_decoder, inStream, 1, sampleBuffer, sampleBufferLen, file_time, bitRate, NULL); - if (dc.command == DECODE_COMMAND_STOP) + if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_STOP) break; } @@ -282,7 +282,7 @@ static int mp4_decode(struct decoder * mpd_decoder, InputStream * inStream) if (dc.state != DECODE_STATE_DECODE) return -1; - if (dc.command == DECODE_COMMAND_SEEK && seeking) { + if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK && seeking) { decoder_clear(mpd_decoder); dc_command_finished(); } |