[WINEMP3.ACM] Sync with Wine Staging 2.16. CORE-13762
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 24 Sep 2017 11:17:34 +0000 (11:17 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 24 Sep 2017 11:17:34 +0000 (11:17 +0000)
ffebb91 winemp3.acm: Fix error in acmStreamSize().

svn path=/trunk/; revision=75943

reactos/dll/win32/winemp3.acm/mpegl3.c
reactos/media/doc/README.WINE

index 3386ae4..9c875dc 100644 (file)
@@ -953,11 +953,11 @@ static    LRESULT MPEG3_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE ad
              adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEG))
         {
             nblocks = adss->cbSrcLength / (adsi->pwfxSrc->nBlockAlign * 1152);
-            if (nblocks == 0)
-                return ACMERR_NOTPOSSIBLE;
             if (adss->cbSrcLength % (DWORD)(adsi->pwfxSrc->nBlockAlign * 1152))
                 /* Round block count up. */
                 nblocks++;
+            if (nblocks == 0)
+                return ACMERR_NOTPOSSIBLE;
             adss->cbDstLength = 3000 + nblocks * (DWORD)(adsi->pwfxDst->nAvgBytesPerSec * 1152 / adsi->pwfxDst->nSamplesPerSec + 0.5);
        }
         else if ((adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 ||
@@ -965,11 +965,11 @@ static    LRESULT MPEG3_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE ad
                  adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
         {
             nblocks = adss->cbSrcLength / (DWORD)(adsi->pwfxSrc->nAvgBytesPerSec * 1152 / adsi->pwfxSrc->nSamplesPerSec);
-            if (nblocks == 0)
-                return ACMERR_NOTPOSSIBLE;
             if (adss->cbSrcLength % (DWORD)(adsi->pwfxSrc->nAvgBytesPerSec * 1152 / adsi->pwfxSrc->nSamplesPerSec))
                 /* Round block count up. */
                 nblocks++;
+            if (nblocks == 0)
+                return ACMERR_NOTPOSSIBLE;
             adss->cbDstLength = nblocks * 1152 * adsi->pwfxDst->nBlockAlign;
        }
         else
index 02b834e..43992e9 100644 (file)
@@ -198,7 +198,7 @@ reactos/dll/win32/wbemdisp            # Synced to WineStaging-2.16
 reactos/dll/win32/wbemprox            # Synced to WineStaging-2.16
 reactos/dll/win32/windowscodecs       # Synced to WineStaging-2.9
 reactos/dll/win32/windowscodecsext    # Synced to WineStaging-2.9
-reactos/dll/win32/winemp3.acm         # Synced to WineStaging-2.9
+reactos/dll/win32/winemp3.acm         # Synced to WineStaging-2.16
 reactos/dll/win32/wing32              # Synced to WineStaging-2.9
 reactos/dll/win32/winhttp             # Synced to WineStaging-2.9
 reactos/dll/win32/wininet             # Synced to WineStaging-2.9