[MCIAVI32] Sync with Wine Staging 1.7.55. CORE-10536
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 21 Nov 2015 09:25:00 +0000 (09:25 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 21 Nov 2015 09:25:00 +0000 (09:25 +0000)
svn path=/trunk/; revision=69974

reactos/dll/win32/mciavi32/mciavi.c
reactos/dll/win32/mciavi32/mmoutput.c
reactos/media/doc/README.WINE

index de9055d..5674fe9 100644 (file)
@@ -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);
index 3a2d4de..db31560 100644 (file)
@@ -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;
index 1804f31..0726de2 100644 (file)
@@ -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