aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-23 23:59:55 +0200
committerMax Kellermann <max@duempel.org>2008-09-23 23:59:55 +0200
commitd42959c5ce76fcca87b9eeb89ce44fcae28bda1d (patch)
treef346352d4c808557c6a8fe78fd7b8648aef03642 /src
parent0c934f9d363c1d3568f53835af860dfead83385f (diff)
downloadmpd-d42959c5ce76fcca87b9eeb89ce44fcae28bda1d.tar.gz
mpd-d42959c5ce76fcca87b9eeb89ce44fcae28bda1d.tar.xz
mpd-d42959c5ce76fcca87b9eeb89ce44fcae28bda1d.zip
flac: removed FlacData.chunk_length
chunk_length can be converted to a local variable, because it is always reset to 0 after it was used.
Diffstat (limited to 'src')
-rw-r--r--src/inputPlugins/_flac_common.c9
-rw-r--r--src/inputPlugins/_flac_common.h1
2 files changed, 2 insertions, 8 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index 39baeff3c..550df77df 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -33,7 +33,6 @@
void init_FlacData(FlacData * data, struct decoder * decoder,
InputStream * inStream)
{
- data->chunk_length = 0;
data->time = 0;
data->position = 0;
data->bitRate = 0;
@@ -305,15 +304,11 @@ flac_common_write(FlacData *data, const FLAC__Frame * frame,
num_channels, bytes_per_sample, buf,
c_samp, c_samp + num_samples);
- data->chunk_length = num_samples * bytes_per_channel;
-
cmd = decoder_data(data->decoder, data->inStream,
1, data->chunk,
- data->chunk_length, data->time,
- data->bitRate,
+ num_samples * bytes_per_channel,
+ data->time, data->bitRate,
data->replayGainInfo);
- data->chunk_length = 0;
-
switch (cmd) {
case DECODE_COMMAND_NONE:
case DECODE_COMMAND_START:
diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h
index 4ca97cae0..e05824147 100644
--- a/src/inputPlugins/_flac_common.h
+++ b/src/inputPlugins/_flac_common.h
@@ -140,7 +140,6 @@ typedef size_t flac_read_status_size_t;
typedef struct {
unsigned char chunk[FLAC_CHUNK_SIZE];
- size_t chunk_length;
float time;
unsigned int bitRate;
struct audio_format audio_format;