quartz: Don't redundantly set waveparser output pin data before
it's created
Chris Robinson
chris.kcat at gmail.com
Tue Mar 20 12:32:34 CDT 2007
-------------- next part --------------
From a86723ea49b6b3649551d5a96c1d3438ac65417f Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat at gmail.com>
Date: Tue, 20 Mar 2007 10:31:14 -0700
Subject: [PATCH] quartz: Don't redundantly set waveparser output pin data before it's created
---
dlls/quartz/waveparser.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c
index 54ea9ad..5cd979f 100644
--- a/dlls/quartz/waveparser.c
+++ b/dlls/quartz/waveparser.c
@@ -265,13 +265,6 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin)
hr = IAsyncReader_SyncRead(This->pReader, pos, amt.cbFormat, amt.pbFormat);
memcpy(&amt.subtype, &MEDIATYPE_Audio, sizeof(GUID));
amt.subtype.Data1 = ((WAVEFORMATEX*)amt.pbFormat)->wFormatTag;
- /* CopyMediaType(&((OutputPin*)pWAVEParser->ppPins[1])->pin.mtCurrent, &amt); */
- ((Parser_OutputPin*)pWAVEParser->Parser.ppPins[1])->pmt = (AM_MEDIA_TYPE*) CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
-
- CopyMediaType(((Parser_OutputPin*)pWAVEParser->Parser.ppPins[1])->pmt, &amt);
-
- /* Update buffer alignment of media samples in output */
- ((Parser_OutputPin*)pWAVEParser->Parser.ppPins[1])->pin.allocProps.cbAlign = ((WAVEFORMATEX*)amt.pbFormat)->nBlockAlign;
pos += chunk.cb;
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(chunk), (BYTE *)&chunk);
@@ -296,7 +289,7 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin)
if (hr != S_OK)
return E_FAIL;
- props.cbAlign = 1;
+ props.cbAlign = ((WAVEFORMATEX*)amt.pbFormat)->nBlockAlign;
props.cbPrefix = 0;
props.cbBuffer = 4096;
props.cBuffers = 2;
--
1.4.4.4
More information about the wine-patches
mailing list