diff --git a/reactos/dll/win32/mciavi32/mciavi.c b/reactos/dll/win32/mciavi32/mciavi.c index de9055dd3ce..5674fe9c85e 100644 --- a/reactos/dll/win32/mciavi32/mciavi.c +++ b/reactos/dll/win32/mciavi32/mciavi.c @@ -391,8 +391,8 @@ static DWORD MCIAVI_player(WINE_MCIAVI *wma, DWORD dwFlags, LPMCI_PLAY_PARMS lpP { while(next_frame_us <= tc && wma->dwCurrVideoFrame < wma->dwToVideoFrame){ double dur; - ++wma->dwCurrVideoFrame; dur = MCIAVI_PaintFrame(wma, hDC); + ++wma->dwCurrVideoFrame; if(!dur) break; next_frame_us += dur; @@ -400,14 +400,19 @@ static DWORD MCIAVI_player(WINE_MCIAVI *wma, DWORD dwFlags, LPMCI_PLAY_PARMS lpP } ReleaseDC(wma->hWndPaint, hDC); } - if(wma->dwCurrVideoFrame >= wma->dwToVideoFrame) - break; + if (wma->dwCurrVideoFrame >= wma->dwToVideoFrame) + { + if (!(dwFlags & MCI_DGV_PLAY_REPEAT)) + break; + TRACE("repeat media as requested\n"); + wma->dwCurrVideoFrame = wma->dwCurrAudioBlock = 0; + } if (wma->lpWaveFormat) MCIAVI_PlayAudioBlocks(wma, nHdr, waveHdr); tc = currenttime_us(); - if(tc < next_frame_us) + if (tc < next_frame_us) delta = next_frame_us - tc; else delta = 0; @@ -530,7 +535,7 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms if (dwFlags & MCI_DGV_PLAY_REVERSE) return MCIERR_UNSUPPORTED_FUNCTION; if (dwFlags & MCI_TEST) return 0; - if (dwFlags & (MCI_DGV_PLAY_REPEAT|MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLSCREEN|MCI_MCIAVI_PLAY_FULLBY2)) + if (dwFlags & (MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLSCREEN|MCI_MCIAVI_PLAY_FULLBY2)) FIXME("Unsupported flag %08x\n", dwFlags); EnterCriticalSection(&wma->cs); diff --git a/reactos/dll/win32/mciavi32/mmoutput.c b/reactos/dll/win32/mciavi32/mmoutput.c index 3a2d4de8279..db3156012f0 100644 --- a/reactos/dll/win32/mciavi32/mmoutput.c +++ b/reactos/dll/win32/mciavi32/mmoutput.c @@ -187,8 +187,11 @@ static BOOL MCIAVI_AddFrame(WINE_MCIAVI* wma, LPMMCKINFO mmck, */ twocc = TWOCCFromFOURCC(mmck->ckid); if (twocc == TWOCCFromFOURCC(wma->inbih->biCompression)) - twocc = cktypeDIBcompressed; - + twocc = cktypeDIBcompressed; + /* Also detect some chunks that seem to be used by Indeo videos where the chunk is named + * after the codec. */ + else if (twocc == LOWORD(wma->ash_video.fccHandler)) + twocc = cktypeDIBcompressed; switch (twocc) { case cktypeDIBbits: case cktypeDIBcompressed: @@ -395,8 +398,8 @@ BOOL MCIAVI_GetInfo(WINE_MCIAVI* wma) mmioAscend(wma->hFile, &mmckInfo, 0); } if (alb.numVideoFrames != wma->dwPlayableVideoFrames) { - WARN("Found %d video frames (/%d), reducing playable frames\n", - alb.numVideoFrames, wma->dwPlayableVideoFrames); + WARN("AVI header says %d frames, we found %d video frames, reducing playable frames\n", + wma->dwPlayableVideoFrames, alb.numVideoFrames); wma->dwPlayableVideoFrames = alb.numVideoFrames; } wma->dwPlayableAudioBlocks = alb.numAudioBlocks; diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 1804f315e38..0726de2880b 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -93,7 +93,7 @@ reactos/dll/win32/localspl # Synced to WineStaging-1.7.55 reactos/dll/win32/localui # Synced to WineStaging-1.7.47 reactos/dll/win32/lz32 # Synced to WineStaging-1.7.47 reactos/dll/win32/mapi32 # Synced to WineStaging-1.7.47 -reactos/dll/win32/mciavi32 # Synced to WineStaging-1.7.47 +reactos/dll/win32/mciavi32 # Synced to WineStaging-1.7.55 reactos/dll/win32/mcicda # Synced to WineStaging-1.7.47 reactos/dll/win32/mciqtz32 # Synced to WineStaging-1.7.47 reactos/dll/win32/mciseq # Synced to WineStaging-1.7.47