quartz: Don't redundantly set waveparser output pin data before it's created.
This commit is contained in:
parent
e3d7274727
commit
ef5de5c120
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue