Loïc Hoguin : winemp3.acm: mpg123_getformat must be called on MPG123_NEW_FORMAT errors for libmpg123 < 1.8.0.

Alexandre Julliard julliard at winehq.org
Wed Dec 30 10:18:17 CST 2009


Module: wine
Branch: master
Commit: 05a258b2c9d20cfdec9d329a692f8a02204f5905
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=05a258b2c9d20cfdec9d329a692f8a02204f5905

Author: Loïc Hoguin <essen at dev-extend.eu>
Date:   Mon Dec 28 18:17:24 2009 +0100

winemp3.acm: mpg123_getformat must be called on MPG123_NEW_FORMAT errors for libmpg123 < 1.8.0.

The documentation for libmpg123 clearly state that mpg123_getformat MUST
be called if an error MPG123_NEW_FORMAT is returned, for libmpg123 < 1.8.0.
On versions above that, the call is optional. The patch make sure to call
that function all the time (instead of just when trace is activated) so
that mp3 works in Morrowind and others.

---

 dlls/winemp3.acm/mpegl3.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/dlls/winemp3.acm/mpegl3.c b/dlls/winemp3.acm/mpegl3.c
index 2d291cf..fd06c0d 100644
--- a/dlls/winemp3.acm/mpegl3.c
+++ b/dlls/winemp3.acm/mpegl3.c
@@ -174,13 +174,10 @@ static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
 
         if (ret == MPG123_NEW_FORMAT)
         {
-            if TRACE_ON(mpeg3)
-            {
-                long rate;
-                int channels, enc;
-                mpg123_getformat(amd->mh, &rate, &channels, &enc);
-                TRACE("New format: %li Hz, %i channels, encoding value %i\n", rate, channels, enc);
-            }
+            long rate;
+            int channels, enc;
+            mpg123_getformat(amd->mh, &rate, &channels, &enc);
+            TRACE("New format: %li Hz, %i channels, encoding value %i\n", rate, channels, enc);
         }
         dpos += size;
     } while (ret == MPG123_OK);




More information about the wine-cvs mailing list