forked from Mirrors/wine-wine
quartz: Skip AVI bad chunks while looking for the LIST chunk.
parent
b4ce95c1ab
commit
c49e9d085d
|
@ -1109,24 +1109,18 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos += sizeof(RIFFCHUNK) + list.cb;
|
/* Skip any chunks until we find the LIST chunk */
|
||||||
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list);
|
do
|
||||||
|
|
||||||
while (list.fcc == ckidAVIPADDING || (list.fcc == FOURCC_LIST && list.fccListType != listtypeAVIMOVIE))
|
|
||||||
{
|
{
|
||||||
pos += sizeof(RIFFCHUNK) + list.cb;
|
pos += sizeof(RIFFCHUNK) + list.cb;
|
||||||
|
|
||||||
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list);
|
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list);
|
||||||
}
|
}
|
||||||
|
while (hr == S_OK && (list.fcc != FOURCC_LIST ||
|
||||||
|
(list.fcc == FOURCC_LIST && list.fccListType != listtypeAVIMOVIE)));
|
||||||
|
|
||||||
if (list.fcc != FOURCC_LIST)
|
if (hr != S_OK)
|
||||||
{
|
{
|
||||||
ERR("Expected LIST, but got %.04s\n", (LPSTR)&list.fcc);
|
ERR("Failed to find LIST chunk from AVI file\n");
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
if (list.fccListType != listtypeAVIMOVIE)
|
|
||||||
{
|
|
||||||
ERR("Expected AVI movie list, but got %.04s\n", (LPSTR)&list.fccListType);
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1134,8 +1128,6 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
|
||||||
|
|
||||||
/* FIXME: AVIX files are extended beyond the FOURCC chunk "AVI ", and thus won't be played here,
|
/* FIXME: AVIX files are extended beyond the FOURCC chunk "AVI ", and thus won't be played here,
|
||||||
* once I get one of the files I'll try to fix it */
|
* once I get one of the files I'll try to fix it */
|
||||||
if (hr == S_OK)
|
|
||||||
{
|
|
||||||
This->rtStart = pAviSplit->CurrentChunkOffset = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFLIST));
|
This->rtStart = pAviSplit->CurrentChunkOffset = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFLIST));
|
||||||
pos += list.cb + sizeof(RIFFCHUNK);
|
pos += list.cb + sizeof(RIFFCHUNK);
|
||||||
|
|
||||||
|
@ -1147,7 +1139,6 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IAsyncReader_SyncRead(This->pReader, BYTES_FROM_MEDIATIME(pAviSplit->CurrentChunkOffset), sizeof(pAviSplit->CurrentChunk), (BYTE *)&pAviSplit->CurrentChunk);
|
hr = IAsyncReader_SyncRead(This->pReader, BYTES_FROM_MEDIATIME(pAviSplit->CurrentChunkOffset), sizeof(pAviSplit->CurrentChunk), (BYTE *)&pAviSplit->CurrentChunk);
|
||||||
}
|
|
||||||
|
|
||||||
props->cbAlign = 1;
|
props->cbAlign = 1;
|
||||||
props->cbPrefix = 0;
|
props->cbPrefix = 0;
|
||||||
|
|
Loading…
Reference in New Issue