From 248e6e3681d09d527c44d65b4c5d141fabc773a4 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 3 Oct 2011 15:26:39 +0000 Subject: fixed ape bitrate git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2371 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp index 743b9456a..e5f7ee324 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp @@ -246,7 +246,10 @@ bool DecoderFFmpeg::initialize() else configure(c->sample_rate, c->request_channels, Qmmp::PCM_S16LE); #endif - m_bitrate = c->bit_rate; + if(ic->bit_rate) + m_bitrate = ic->bit_rate; + if(c->bit_rate) + m_bitrate = c->bit_rate; qDebug("DecoderFFmpeg: initialize succes"); return true; } @@ -293,7 +296,8 @@ qint64 DecoderFFmpeg::ffmpeg_decode(uint8_t *audio) #else int l = avcodec_decode_audio2(c, (int16_t *)(audio), &out_size, m_temp_pkt.data, m_temp_pkt.size); #endif - m_bitrate = c->bit_rate/1024; + if(c->bit_rate) + m_bitrate = c->bit_rate/1000; if(l < 0) return l; m_temp_pkt.data += l; -- cgit v1.2.3-13-gbd6f