From c9e15bc418d4a27305b39ccc63e631ac5e329c8b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Nov 2008 17:01:51 +0100 Subject: decoder_api: pass "seekable" flag to decoder_initialized() Don't pass the "seekable" flag with every decoder_data() invocation. Since that flag won't change within the file, it is enough to pass it to decoder_initialized() once per file. --- src/decoder/aac_plugin.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/decoder/aac_plugin.c') diff --git a/src/decoder/aac_plugin.c b/src/decoder/aac_plugin.c index bf4879a19..66c2d11be 100644 --- a/src/decoder/aac_plugin.c +++ b/src/decoder/aac_plugin.c @@ -391,7 +391,8 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream) if (!initialized) { audio_format.channels = frameInfo.channels; audio_format.sample_rate = sample_rate; - decoder_initialized(mpd_decoder, &audio_format, totalTime); + decoder_initialized(mpd_decoder, &audio_format, + false, totalTime); initialized = true; } @@ -410,7 +411,7 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *inStream) sampleBufferLen = sampleCount * 2; - decoder_data(mpd_decoder, NULL, 0, sampleBuffer, + decoder_data(mpd_decoder, NULL, sampleBuffer, sampleBufferLen, file_time, bitRate, NULL); if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK) { @@ -527,7 +528,7 @@ aac_decode(struct decoder *mpd_decoder, const char *path) audio_format.channels = frameInfo.channels; audio_format.sample_rate = sample_rate; decoder_initialized(mpd_decoder, &audio_format, - totalTime); + false, totalTime); initialized = true; } @@ -546,7 +547,7 @@ aac_decode(struct decoder *mpd_decoder, const char *path) sampleBufferLen = sampleCount * 2; - decoder_data(mpd_decoder, NULL, 0, sampleBuffer, + decoder_data(mpd_decoder, NULL, sampleBuffer, sampleBufferLen, file_time, bitRate, NULL); if (decoder_get_command(mpd_decoder) == DECODE_COMMAND_SEEK) { -- cgit v1.2.3