Mercurial > mplayer.hg
changeset 5346:a781c611f193
Fix aac decoded size.
author | atmos4 |
---|---|
date | Tue, 26 Mar 2002 01:01:09 +0000 |
parents | 81071ffb7b22 |
children | 0ba8c5086d11 |
files | dec_audio.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/dec_audio.c Mon Mar 25 22:25:58 2002 +0000 +++ b/dec_audio.c Tue Mar 26 01:01:09 2002 +0000 @@ -900,6 +900,7 @@ mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %dHz channels: %d\n", faac_samplerate, faac_channels); sh_audio->channels = faac_channels; sh_audio->samplerate = faac_samplerate; + //sh_audio->o_bps = sh_audio->samplesize*faac_channels*faac_samplerate; if(!sh_audio->i_bps) { mp_msg(MSGT_DECAUDIO,MSGL_WARN,"FAAD: compressed input bitrate missing, assuming 128kbit/s!\n"); sh_audio->i_bps = 128*1000/8; // XXX: HACK!!! ::atmos @@ -1079,7 +1080,7 @@ case AFM_AAC: { int /*i,*/ k, j = 0; void *faac_sample_buffer; - + len = 0; while(len < minlen) { /* update buffer */ @@ -1110,9 +1111,12 @@ } else if (faac_finfo.samples == 0) mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Decoded zero samples!\n"); else { - mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%dBytes)!\n", faac_finfo.samples*faac_finfo.channels); - memcpy(buf+len,faac_sample_buffer, faac_finfo.samples*faac_finfo.channels); - len += faac_finfo.samples*faac_finfo.channels; + /* XXX: samples already multiplied by channels! */ + mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%d Bytes)!\n", + sh_audio->samplesize*faac_finfo.samples); + memcpy(buf+len,faac_sample_buffer, sh_audio->samplesize*faac_finfo.samples); + len += sh_audio->samplesize*faac_finfo.samples; + //printf("FAAD: buffer: %d bytes consumed: %d \n", k, faac_finfo.bytesconsumed); } }