mciavi32: Add partial support for MCI_DGV_PLAY_REPEAT
Bruno Jesus
00cpxxx at gmail.com
Sun Aug 30 12:39:56 CDT 2015
Tested manually with some videos and it works as expected.
Partial fix for bug https://bugs.winehq.org/show_bug.cgi?id=19122
-------------- next part --------------
diff --git a/dlls/mciavi32/mciavi.c b/dlls/mciavi32/mciavi.c
index 079c696..b1c89f0 100644
--- a/dlls/mciavi32/mciavi.c
+++ b/dlls/mciavi32/mciavi.c
@@ -402,14 +402,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;
@@ -532,7 +537,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);
More information about the wine-patches
mailing list