[PATCH 4/4] quartz: Refuse WAVE_FORMAT_PCM/EXTENSIBLE in acmwrapper

Maarten Lankhorst m.b.lankhorst at gmail.com
Wed Dec 1 16:17:31 CST 2010


Converting wave formats to the exact same format is probably a bad idea
---
 dlls/quartz/acmwrapper.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index dfd0529..3659326 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -259,7 +259,11 @@ static HRESULT WINAPI ACMWrapper_SetMediaType(TransformFilter *tf, PIN_DIRECTION
         (IsEqualIID(&pmt->formattype, &FORMAT_WaveFormatEx)))
     {
         HACMSTREAM drv;
+        WAVEFORMATEX *wfx = (WAVEFORMATEX*)pmt->pbFormat;
         AM_MEDIA_TYPE* outpmt = &This->tf.pmt;
+
+        if (!wfx || wfx->wFormatTag == WAVE_FORMAT_PCM || wfx->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
+            return VFW_E_TYPE_NOT_ACCEPTED;
         FreeMediaType(outpmt);
 
         This->pWfIn = (LPWAVEFORMATEX)pmt->pbFormat;
-- 
1.7.1




More information about the wine-patches mailing list