CVS: main/loader/dshow DS_AudioDecoder.c,1.7,1.8
Update of /cvsroot/mplayer/main/loader/dshow In directory mplayer:/var/tmp.root/cvs-serv15164 Modified Files: DS_AudioDecoder.c Log Message: ACEL.P fixed (avifile sync) Index: DS_AudioDecoder.c =================================================================== RCS file: /cvsroot/mplayer/main/loader/dshow/DS_AudioDecoder.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- DS_AudioDecoder.c 11 Dec 2001 23:29:11 -0000 1.7 +++ DS_AudioDecoder.c 31 Dec 2001 04:35:20 -0000 1.8 @@ -41,14 +41,15 @@ sz = 18 + wf->cbSize; this->m_sVhdr = malloc(sz); memcpy(this->m_sVhdr, wf, sz); - this->m_sVhdr2 = malloc(sz); - memcpy(this->m_sVhdr2, this->m_sVhdr, sz); + this->m_sVhdr2 = malloc(18); + memcpy(this->m_sVhdr2, this->m_sVhdr, 18); pWF = (WAVEFORMATEX*)this->m_sVhdr2; pWF->wFormatTag = 1; pWF->wBitsPerSample = 16; - pWF->nBlockAlign = 2*pWF->nChannels; + pWF->nBlockAlign = pWF->nChannels * (pWF->wBitsPerSample + 7) / 8; pWF->cbSize = 0; + pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec; memcpy(&this->in_fmt,wf,sizeof(WAVEFORMATEX)); @@ -67,18 +68,21 @@ memset(&this->m_sDestType, 0, sizeof(this->m_sDestType)); this->m_sDestType.majortype=MEDIATYPE_Audio; this->m_sDestType.subtype=MEDIASUBTYPE_PCM; - this->m_sDestType.subtype.f1=pWF->wFormatTag; +// this->m_sDestType.subtype.f1=pWF->wFormatTag; this->m_sDestType.formattype=FORMAT_WaveFormatEx; this->m_sDestType.bFixedSizeSamples=1; this->m_sDestType.bTemporalCompression=0; - this->m_sDestType.lSampleSize=2*wf->nChannels; + this->m_sDestType.lSampleSize=pWF->nBlockAlign; if (wf->wFormatTag == 0x130) // ACEL hack to prevent memory corruption // obviosly we are missing something here this->m_sDestType.lSampleSize *= 288; this->m_sDestType.pUnk=0; - this->m_sDestType.cbFormat=pWF->cbSize; + this->m_sDestType.cbFormat=18; //pWF->cbSize; this->m_sDestType.pbFormat=this->m_sVhdr2; + +print_wave_header(this->m_sVhdr); +print_wave_header(this->m_sVhdr2); /*try*/ {
participants (1)
-
Arpi of Ize