[LIBMPG123] Update to v1.22.4.
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 2 Dec 2015 11:13:12 +0000 (11:13 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 2 Dec 2015 11:13:12 +0000 (11:13 +0000)
svn path=/trunk/; revision=70233

reactos/lib/3rdparty/libmpg123/id3.c
reactos/lib/3rdparty/libmpg123/parse.c
reactos/media/doc/3rd Party Files.txt

index 146d59e..90c8332 100644 (file)
@@ -1051,10 +1051,10 @@ static void convert_utf16bom(mpg123_string *sb, const unsigned char* s, size_t l
        for(i=0; i < n; i+=2)
        {
                unsigned long point = ((unsigned long) s[i+high]<<8) + s[i+low];
        for(i=0; i < n; i+=2)
        {
                unsigned long point = ((unsigned long) s[i+high]<<8) + s[i+low];
-               if((point & 0xd800) == 0xd800) /* lead surrogate */
+               if((point & 0xfc00) == 0xd800) /* lead surrogate */
                {
                        unsigned short second = (i+3 < l) ? (s[i+2+high]<<8) + s[i+2+low] : 0;
                {
                        unsigned short second = (i+3 < l) ? (s[i+2+high]<<8) + s[i+2+low] : 0;
-                       if((second & 0xdc00) == 0xdc00) /* good... */
+                       if((second & 0xfc00) == 0xdc00) /* good... */
                        {
                                point = FULLPOINT(point,second);
                                length += UTF8LEN(point); /* possibly 4 bytes */
                        {
                                point = FULLPOINT(point,second);
                                length += UTF8LEN(point); /* possibly 4 bytes */
@@ -1077,7 +1077,7 @@ static void convert_utf16bom(mpg123_string *sb, const unsigned char* s, size_t l
        for(i=0; i < n; i+=2)
        {
                unsigned long codepoint = ((unsigned long) s[i+high]<<8) + s[i+low];
        for(i=0; i < n; i+=2)
        {
                unsigned long codepoint = ((unsigned long) s[i+high]<<8) + s[i+low];
-               if((codepoint & 0xd800) == 0xd800) /* lead surrogate */
+               if((codepoint & 0xfc00) == 0xd800) /* lead surrogate */
                {
                        unsigned short second = (s[i+2+high]<<8) + s[i+2+low];
                        codepoint = FULLPOINT(codepoint,second);
                {
                        unsigned short second = (s[i+2+high]<<8) + s[i+2+low];
                        codepoint = FULLPOINT(codepoint,second);
index 142ac27..9d5c5dd 100644 (file)
@@ -694,7 +694,7 @@ read_frame_bad:
  * <0: error codes, possibly from feeder buffer (NEED_MORE)
  *  PARSE_BAD: cannot get the framesize for some reason and shall silentry try the next possible header (if this is no free format stream after all...)
  */
  * <0: error codes, possibly from feeder buffer (NEED_MORE)
  *  PARSE_BAD: cannot get the framesize for some reason and shall silentry try the next possible header (if this is no free format stream after all...)
  */
-static int guess_freeformat_framesize(mpg123_handle *fr)
+static int guess_freeformat_framesize(mpg123_handle *fr, unsigned long oldhead)
 {
        long i;
        int ret;
 {
        long i;
        int ret;
@@ -714,7 +714,7 @@ static int guess_freeformat_framesize(mpg123_handle *fr)
                if((ret=fr->rd->head_shift(fr,&head))<=0) return ret;
 
                /* No head_check needed, the mask contains all relevant bits. */
                if((ret=fr->rd->head_shift(fr,&head))<=0) return ret;
 
                /* No head_check needed, the mask contains all relevant bits. */
-               if((head & HDR_SAMEMASK) == (fr->oldhead & HDR_SAMEMASK))
+               if((head & HDR_SAMEMASK) == (oldhead & HDR_SAMEMASK))
                {
                        fr->rd->back_bytes(fr,i+1);
                        fr->framesize = i-3;
                {
                        fr->rd->back_bytes(fr,i+1);
                        fr->framesize = i-3;
@@ -791,7 +791,7 @@ static int decode_header(mpg123_handle *fr,unsigned long newhead, int *freeforma
                                if(VERBOSE3) error("You fooled me too often. Refusing to guess free format frame size _again_.");
                                return PARSE_BAD;
                        }
                                if(VERBOSE3) error("You fooled me too often. Refusing to guess free format frame size _again_.");
                                return PARSE_BAD;
                        }
-                       ret = guess_freeformat_framesize(fr);
+                       ret = guess_freeformat_framesize(fr, newhead);
                        if(ret == PARSE_GOOD)
                        {
                                fr->freeformat_framesize = fr->framesize - fr->padding;
                        if(ret == PARSE_GOOD)
                        {
                                fr->freeformat_framesize = fr->framesize - fr->padding;
index f6e0aaa..527fe0e 100644 (file)
@@ -63,7 +63,7 @@ Used Version: 0.1.8
 Website: http://www.mega-nerd.com/SRC/download.html
 
 Title:  libmpg123 (used by winemp3.acm)
 Website: http://www.mega-nerd.com/SRC/download.html
 
 Title:  libmpg123 (used by winemp3.acm)
-Used Version: 1.22.1
+Used Version: 1.22.4
 Website: http://www.mpg123.de/
 
 Title:  STLport
 Website: http://www.mpg123.de/
 
 Title:  STLport