aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-11 19:52:14 +0100
committerMax Kellermann <max@duempel.org>2009-11-11 19:52:14 +0100
commitd35efddd65934e5adebe0c01ab7953c9a34082ed (patch)
treeb30c23cfeb9d644a36e3450c9602ad3e41ef255f /src/decoder/_flac_common.h
parent7b13776f2dd2feeb4bd28e8cf023ec81474e4eaa (diff)
downloadmpd-d35efddd65934e5adebe0c01ab7953c9a34082ed.tar.gz
mpd-d35efddd65934e5adebe0c01ab7953c9a34082ed.tar.xz
mpd-d35efddd65934e5adebe0c01ab7953c9a34082ed.zip
decoder/flac: calculate bit rate in flac_common_write()
Removed the "bit_rate" attribute from the flac_data struct. Pass the number of bytes since the last call to flac_common_write(), and let it calculate the bit rate.
Diffstat (limited to '')
-rw-r--r--src/decoder/_flac_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/_flac_common.h b/src/decoder/_flac_common.h
index 895cdf1b9..aa17c55ae 100644
--- a/src/decoder/_flac_common.h
+++ b/src/decoder/_flac_common.h
@@ -57,7 +57,6 @@ struct flac_data {
FLAC__uint64 next_frame;
float time;
- unsigned int bit_rate;
struct audio_format audio_format;
FLAC__uint64 position;
struct decoder *decoder;
@@ -83,7 +82,8 @@ void flac_error_common_cb(const char *plugin,
FLAC__StreamDecoderWriteStatus
flac_common_write(struct flac_data *data, const FLAC__Frame * frame,
- const FLAC__int32 *const buf[]);
+ const FLAC__int32 *const buf[],
+ FLAC__uint64 nbytes);
#if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7