quartz/waveparser: Ignore unsupported chunks when connecting.
In particular, the test file just added contains 'LIST' chunks. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dc8cb0c370
commit
0e4acebb7e
|
@ -30,9 +30,17 @@
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "dshow.h"
|
#include "dshow.h"
|
||||||
|
#include "wine/debug.h"
|
||||||
#include "wine/strmbase.h"
|
#include "wine/strmbase.h"
|
||||||
#include "wine/list.h"
|
#include "wine/list.h"
|
||||||
|
|
||||||
|
static inline const char *debugstr_fourcc(DWORD fourcc)
|
||||||
|
{
|
||||||
|
if (!fourcc) return "''";
|
||||||
|
return wine_dbg_sprintf("'%c%c%c%c'", (char)(fourcc), (char)(fourcc >> 8),
|
||||||
|
(char)(fourcc >> 16), (char)(fourcc >> 24));
|
||||||
|
}
|
||||||
|
|
||||||
/* see IAsyncReader::Request on MSDN for the explanation of this */
|
/* see IAsyncReader::Request on MSDN for the explanation of this */
|
||||||
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
|
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
|
||||||
#define SEC_FROM_MEDIATIME(time) ((time) / 10000000)
|
#define SEC_FROM_MEDIATIME(time) ((time) / 10000000)
|
||||||
|
|
|
@ -296,20 +296,14 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
|
||||||
|
|
||||||
pos += chunk.cb;
|
pos += chunk.cb;
|
||||||
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(chunk), (BYTE *)&chunk);
|
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(chunk), (BYTE *)&chunk);
|
||||||
if (chunk.fcc == mmioFOURCC('f','a','c','t'))
|
while (chunk.fcc != mmioFOURCC('d','a','t','a'))
|
||||||
{
|
{
|
||||||
FIXME("'fact' chunk not supported yet\n");
|
FIXME("Ignoring %s chunk.\n", debugstr_fourcc(chunk.fcc));
|
||||||
pos += sizeof(chunk) + chunk.cb;
|
pos += sizeof(chunk) + chunk.cb;
|
||||||
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(chunk), (BYTE *)&chunk);
|
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(chunk), (BYTE *)&chunk);
|
||||||
}
|
|
||||||
if (chunk.fcc != mmioFOURCC('d','a','t','a'))
|
|
||||||
{
|
|
||||||
ERR("Expected 'data' chunk, but got %.04s\n", (LPSTR)&chunk.fcc);
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hr != S_OK)
|
if (hr != S_OK)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
pWAVEParser->StartOfFile = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFCHUNK));
|
pWAVEParser->StartOfFile = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFCHUNK));
|
||||||
pWAVEParser->EndOfFile = MEDIATIME_FROM_BYTES(pos + chunk.cb + sizeof(RIFFCHUNK));
|
pWAVEParser->EndOfFile = MEDIATIME_FROM_BYTES(pos + chunk.cb + sizeof(RIFFCHUNK));
|
||||||
|
|
Loading…
Reference in New Issue