From 8582d35fe20f5edf5e182a26f9b634fd940677af Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 14 Jul 2008 14:22:09 -0700 Subject: [PATCH] quartz: Explicitly handle wave headers in avi splitter --- dlls/quartz/avisplit.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index 9d00b4d..2bbd8f1 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -724,6 +724,15 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE if (pvi->bmiHeader.biCompression) amt.subtype.Data1 = pvi->bmiHeader.biCompression; } + else if (IsEqualIID(&amt.formattype, &FORMAT_WaveFormatEx)) + { + amt.cbFormat = pChunk->cb; + if (amt.cbFormat < sizeof(WAVEFORMATEX)) + amt.cbFormat = sizeof(WAVEFORMATEX); + amt.pbFormat = CoTaskMemAlloc(amt.cbFormat); + ZeroMemory(amt.pbFormat, amt.cbFormat); + CopyMemory(amt.pbFormat, (const BYTE *)(pChunk + 1), pChunk->cb); + } else { amt.cbFormat = pChunk->cb; -- 1.5.4.1