diff options
author | Max Kellermann <max@duempel.org> | 2009-11-11 20:26:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-11 20:36:46 +0100 |
commit | 3973aeecd2b4c91bd42ccc70155cebe8e2aedb8c (patch) | |
tree | 67baac023cd55a403028ae16b0fbb0c1d4cba02e /src/decoder/_flac_common.c | |
parent | 5b2d32b4992f6df38bd738c7b765c42bd9a3ad0e (diff) | |
download | mpd-3973aeecd2b4c91bd42ccc70155cebe8e2aedb8c.tar.gz mpd-3973aeecd2b4c91bd42ccc70155cebe8e2aedb8c.tar.xz mpd-3973aeecd2b4c91bd42ccc70155cebe8e2aedb8c.zip |
decoder/flac: use frame header instead of audio_format
When calculating the properties of the frame, use sample_rate and
other information from the frame header instead of the stored
audio_format object.
Diffstat (limited to 'src/decoder/_flac_common.c')
-rw-r--r-- | src/decoder/_flac_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c index b434f31a3..1e2ab6413 100644 --- a/src/decoder/_flac_common.c +++ b/src/decoder/_flac_common.c @@ -121,13 +121,13 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame, buffer = pcm_buffer_get(&data->buffer, buffer_size); - flac_convert(buffer, data->audio_format.channels, - data->audio_format.bits, buf, + flac_convert(buffer, frame->header.channels, + frame->header.bits_per_sample, buf, 0, frame->header.blocksize); if (data->next_frame >= data->first_frame) position = (float)(data->next_frame - data->first_frame) / - data->audio_format.sample_rate; + frame->header.sample_rate; else position = 0; |