From 30216c0016482506a11fa7f54d72d724e56fa5b3 Mon Sep 17 00:00:00 2001 From: Kirill Belokurov Date: Thu, 27 Mar 2008 17:27:12 +0200 Subject: read only full frames into buffer - otherwise decoder will lose trailing bytes for 24bit AIFF --- src/demuxers/demux_aiff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index 3f2d0df11..f520219fa 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -150,7 +150,9 @@ static int open_aiff_file(demux_aiff_t *this) { (this->audio_bits / 8); this->running_time = (this->audio_frames / this->audio_sample_rate) * 1000; - this->audio_block_align = PCM_BLOCK_ALIGN; + /* we should send only complete frames to decoder, as it + * doesn't handle underconsumption yet */ + this->audio_block_align = PCM_BLOCK_ALIGN - PCM_BLOCK_ALIGN % (this->audio_bits / 8 * this->audio_channels); break; -- cgit v1.2.3