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/audiofile_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/decoder/audiofile_plugin.c') diff --git a/src/decoder/audiofile_plugin.c b/src/decoder/audiofile_plugin.c index 51e1559ce..3c702efe6 100644 --- a/src/decoder/audiofile_plugin.c +++ b/src/decoder/audiofile_plugin.c @@ -89,7 +89,7 @@ audiofile_decode(struct decoder *decoder, const char *path) fs = (int)afGetVirtualFrameSize(af_fp, AF_DEFAULT_TRACK, 1); - decoder_initialized(decoder, &audio_format, total_time); + decoder_initialized(decoder, &audio_format, true, total_time); do { if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) { @@ -105,7 +105,7 @@ audiofile_decode(struct decoder *decoder, const char *path) break; current += ret; - decoder_data(decoder, NULL, 1, + decoder_data(decoder, NULL, chunk, ret * fs, (float)current / (float)audio_format.sample_rate, bitRate, NULL); -- cgit v1.2.3