diff options
author | Max Kellermann <max@duempel.org> | 2008-09-23 23:59:55 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-29 02:05:11 -0700 |
commit | 198f0117c4d1f87cfed51fd51c5bf7bb50cd5334 (patch) | |
tree | 81f37b9c14a3a42e9e8f47472e831217a4a0f854 /src/inputPlugins | |
parent | a748ea5a55f4f5d9f9d58b0e6c7667d61cfde501 (diff) | |
download | mpd-198f0117c4d1f87cfed51fd51c5bf7bb50cd5334.tar.gz mpd-198f0117c4d1f87cfed51fd51c5bf7bb50cd5334.tar.xz mpd-198f0117c4d1f87cfed51fd51c5bf7bb50cd5334.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/inputPlugins')
-rw-r--r-- | src/inputPlugins/_flac_common.c | 9 | ||||
-rw-r--r-- | src/inputPlugins/_flac_common.h | 1 | ||||
-rw-r--r-- | src/inputPlugins/flac_plugin.c | 1 | ||||
-rw-r--r-- | src/inputPlugins/oggflac_plugin.c | 1 |
4 files changed, 3 insertions, 9 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c index 1cbce9488..beff5d431 100644 --- a/src/inputPlugins/_flac_common.c +++ b/src/inputPlugins/_flac_common.c @@ -32,7 +32,6 @@ void init_FlacData(FlacData * data, InputStream * inStream) { - data->chunk_length = 0; data->time = 0; data->position = 0; data->bitRate = 0; @@ -304,12 +303,10 @@ 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; - - action = ob_send(data->chunk, data->chunk_length, + action = ob_send(data->chunk, + num_samples * bytes_per_channel, data->time, data->bitRate, - data->replayGainInfo); - data->chunk_length = 0; + data->replayGainInfo); switch (action) { case DC_ACTION_STOP: return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h index 8031f8e69..f88866b08 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; FLAC__uint64 position; diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c index 2bf5a29bf..228301291 100644 --- a/src/inputPlugins/flac_plugin.c +++ b/src/inputPlugins/flac_plugin.c @@ -359,7 +359,6 @@ static int flac_decode_internal(InputStream * inStream, int is_ogg) data.time = ((float)sampleToSeek) / dc.audio_format.sampleRate; data.position = 0; - data.chunk_length = 0; } else { dc.seek_where = DC_SEEK_ERROR; } diff --git a/src/inputPlugins/oggflac_plugin.c b/src/inputPlugins/oggflac_plugin.c index 49da3dd39..36bd9dced 100644 --- a/src/inputPlugins/oggflac_plugin.c +++ b/src/inputPlugins/oggflac_plugin.c @@ -328,7 +328,6 @@ static int oggflac_decode(InputStream * inStream) data.time = ((float)sampleToSeek) / dc.audio_format.sampleRate; data.position = 0; - data.chunk_length = 0; } else { dc.seek_where = DC_SEEK_ERROR; } |