quartz: Simplify a loop and make the code more robust
Bruno Jesus
00cpxxx at gmail.com
Thu Sep 3 08:06:15 CDT 2015
-------------- next part --------------
diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c
index 6059511..d0316cd 100644
--- a/dlls/quartz/avisplit.c
+++ b/dlls/quartz/avisplit.c
@@ -1109,15 +1109,14 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
return E_FAIL;
}
- pos += sizeof(RIFFCHUNK) + list.cb;
- hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list);
-
- while (list.fcc == ckidAVIPADDING || (list.fcc == FOURCC_LIST && list.fccListType != listtypeAVIMOVIE))
+ do
{
+ list.fcc = 0;
pos += sizeof(RIFFCHUNK) + list.cb;
-
hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list);
}
+ while (hr == S_OK && (list.fcc == ckidAVIPADDING ||
+ (list.fcc == FOURCC_LIST && list.fccListType != listtypeAVIMOVIE)));
if (list.fcc != FOURCC_LIST)
{
More information about the wine-patches
mailing list