# HG changeset patch # User arpi # Date 1008113351 0 # Node ID b6caac381405170c2268d347399a08d3ec59d632 # Parent 4dad31e655b6e3b61b74becf8ccaa90a53b485c3 avifile merge diff -r 4dad31e655b6 -r b6caac381405 loader/dshow/DS_AudioDecoder.c --- a/loader/dshow/DS_AudioDecoder.c Tue Dec 11 22:58:14 2001 +0000 +++ b/loader/dshow/DS_AudioDecoder.c Tue Dec 11 23:29:11 2001 +0000 @@ -72,6 +72,10 @@ this->m_sDestType.bFixedSizeSamples=1; this->m_sDestType.bTemporalCompression=0; this->m_sDestType.lSampleSize=2*wf->nChannels; + 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.pbFormat=this->m_sVhdr2; @@ -144,9 +148,9 @@ Debug printf("DS_AudioDecoder::Convert() Error: null sample\n"); break; } + sample->vt->SetActualDataLength(sample, this->in_fmt.nBlockAlign); sample->vt->GetPointer(sample, (BYTE **)&ptr); memcpy(ptr, (const uint8_t*)in_data + read, this->in_fmt.nBlockAlign); - sample->vt->SetActualDataLength(sample, this->in_fmt.nBlockAlign); sample->vt->SetSyncPoint(sample, 1); sample->vt->SetPreroll(sample, 0); result = this->m_pDS_Filter->m_pImp->vt->Receive(this->m_pDS_Filter->m_pImp, sample); @@ -161,6 +165,7 @@ sample->vt->Release((IUnknown*)sample); read+=this->in_fmt.nBlockAlign; written+=frame_size; + break; } if (size_read) *size_read = read; diff -r 4dad31e655b6 -r b6caac381405 loader/dshow/DS_VideoDecoder.c --- a/loader/dshow/DS_VideoDecoder.c Tue Dec 11 22:58:14 2001 +0000 +++ b/loader/dshow/DS_VideoDecoder.c Tue Dec 11 23:29:11 2001 +0000 @@ -152,14 +152,14 @@ if (!flip) { - this->m_sVhdr2->bmiHeader.biHeight *= -1; this->iv.m_obh.biHeight *= -1; + this->m_sVhdr2->bmiHeader.biHeight = this->iv.m_obh.biHeight; result = this->m_pDS_Filter->m_pOutputPin->vt->QueryAccept(this->m_pDS_Filter->m_pOutputPin, &this->m_sDestType); if (result) { - printf("Decoder does not support upside-down frames\n"); - this->m_sVhdr2->bmiHeader.biHeight *= -1; + printf("Decoder does not support upside-down RGB frames\n"); this->iv.m_obh.biHeight *= -1; + this->m_sVhdr2->bmiHeader.biHeight = this->iv.m_obh.biHeight; } } @@ -280,9 +280,9 @@ } + sample->vt->SetActualDataLength(sample, size); sample->vt->GetPointer(sample, (BYTE **)&ptr); memcpy(ptr, src, size); - sample->vt->SetActualDataLength(sample, size); sample->vt->SetSyncPoint(sample, is_keyframe); sample->vt->SetPreroll(sample, pImage ? 0 : 1); // sample->vt->SetMediaType(sample, &m_sOurType);