[Mplayer-cvslog] CVS: main dec_audio.c,1.89,1.90
Atmosfear
atmos4 at mplayer.dev.hu
Tue Mar 26 02:01:21 CET 2002
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv21104
Modified Files:
dec_audio.c
Log Message:
Fix aac decoded size.
Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- dec_audio.c 24 Mar 2002 03:08:20 -0000 1.89
+++ dec_audio.c 26 Mar 2002 01:01:09 -0000 1.90
@@ -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);
}
}
More information about the MPlayer-cvslog
mailing list