[mpg123-devel] [ mpg123-Bugs-2834636 ] NULL treated as single byte, even for UTF-16
Brought to you by:
sobukus
From: SourceForge.net <no...@so...> - 2011-04-08 08:18:09
|
Bugs item #2834636, was opened at 2009-08-10 00:34 Message generated for change (Settings changed) made by sobukus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=733194&aid=2834636&group_id=135704 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: mpglib Group: svn Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: James Le Cuirot (jerseychewi) Assigned to: Nobody/Anonymous (nobody) Summary: NULL treated as single byte, even for UTF-16 Initial Comment: I reported a bug to the MusicBrainz Picard project because it seemed to be breaking my MP3s. mpg123 was throwing up warnings and XMMS2 wasn't playing them at all. I haven't figured out the problem with XMMS2 yet but it seems that this may have been a coincidence because there is a bug in mpg123. This is what, Lukáš Lalinský, the author of Picard had to say. I also suspected it might be something like this. -------- So, it turns out I was using an ancient version of mpg123. I checked out the source code from SVN and it indeed did print the warnings. With enough -v options, you can see that it's happening only for TXXX frames. So I had a look at the source code and they have a bug in function next_text in src/libmpg123/id3.c. That function is supposed to find an encoded null character, but it doesn't take into account only byte sequences at aligned positions. So if you have UTF-16 LE text, such as: 41 00 4c 00 00 00 42 00 55 00 4d 00 ('A' 'L' '\0' 'B' 'U' 'M') The function should return a pointer to 42 00 55 00 4d 00 (ie, read 41 00 4c 00 and find a null character), but instead it returns a pointer to 00 42 00 55 00 4d 00 because it looks for the null character on any position, not just aligned ones. You can use this mail to submit a bug report to mpg123. :) I'm not sure about XMMS2, but I'm fairly sure this isn't a Picard bug. ---------------------------------------------------------------------- Comment By: James Le Cuirot (jerseychewi) Date: 2009-08-10 12:10 Message: That did the trick. Thanks a lot. :) ---------------------------------------------------------------------- Comment By: Thomas Orgis (sobukus) Date: 2009-08-10 03:02 Message: Man, Sourceforge is driving me nuts -- I just submitted that comment, and where is it now? Lost in Lala-land... Anyhow, here again: I worked on the poor function, would you like to test the current http://mpg123.org/snapshot if it works now with your tags? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=733194&aid=2834636&group_id=135704 |