From 817a68b2b27dc65fb5fc550c83117832e8048c6f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:07 +0200 Subject: 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. --- src/inputPlugins/mp4_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inputPlugins/mp4_plugin.c') 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(); } -- cgit v1.2.3