aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-06 09:55:20 +0100
committerMax Kellermann <max@duempel.org>2010-01-06 09:55:20 +0100
commitde0cdee4aaf891f69b876134c14dd7df6af4f331 (patch)
tree0a56e7995b1ffc02c9b66a6ca90f67c21b81d091 /src
parent550c9319e9f6e68a7f7cc72054de657e6e921072 (diff)
downloadmpd-de0cdee4aaf891f69b876134c14dd7df6af4f331.tar.gz
mpd-de0cdee4aaf891f69b876134c14dd7df6af4f331.tar.xz
mpd-de0cdee4aaf891f69b876134c14dd7df6af4f331.zip
decoder/flac: pass bits_per_sample to flac_sample_format()
Easier to reuse the function.
Diffstat (limited to '')
-rw-r--r--src/decoder/_flac_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c
index 2081f7b09..9a3449096 100644
--- a/src/decoder/_flac_common.c
+++ b/src/decoder/_flac_common.c
@@ -59,9 +59,9 @@ flac_data_deinit(struct flac_data *data)
}
static enum sample_format
-flac_sample_format(const FLAC__StreamMetadata_StreamInfo *si)
+flac_sample_format(unsigned bits_per_sample)
{
- switch (si->bits_per_sample) {
+ switch (bits_per_sample) {
case 8:
return SAMPLE_FORMAT_S8;
@@ -89,7 +89,7 @@ flac_got_stream_info(struct flac_data *data,
GError *error = NULL;
if (!audio_format_init_checked(&data->audio_format,
stream_info->sample_rate,
- flac_sample_format(stream_info),
+ flac_sample_format(stream_info->bits_per_sample),
stream_info->channels, &error)) {
g_warning("%s", error->message);
g_error_free(error);