[MCIAVI32] Add ifdef guards to prevent regression (#5090)

as an addendum to (#5063) and CORE-18669
This commit is contained in:
Atharva Kulkarni 2023-02-21 00:53:37 +05:30 committed by GitHub
parent 647f74d4ab
commit f1de615b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -399,11 +399,13 @@ BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma)
mmioAscend(wma->hFile, &mmckInfo, 0);
}
#ifdef __REACTOS__
/* Empty file */
if (alb.numVideoFrames == 0) {
WARN("NumVideoFrames: %u, Empty or possibly corrupt video file");
return FALSE;
}
#endif
if (alb.numVideoFrames != wma->dwPlayableVideoFrames) {
WARN("AVI header says %d frames, we found %d video frames, reducing playable frames\n",
@ -620,10 +622,12 @@ double MCIAVI_PaintFrame(WINE_MCIAVI* wma, HDC hDC)
if (wma->dwCurrVideoFrame != wma->dwCachedFrame)
{
#ifdef __REACTOS__
if (wma->dwCurrVideoFrame >= wma->dwPlayableVideoFrames) {
ERR("Invalid frame requested. Current : %u Total Playable %u\n", wma->dwCurrVideoFrame, wma->dwPlayableVideoFrames);
return 0;
}
#endif
if (!wma->lpVideoIndex[wma->dwCurrVideoFrame].dwOffset)
return 0;