Mercurial > audlegacy
changeset 1368:9dc0ce1fd3cd trunk
[svn] - having taglib_file, taglib_tag in the global namespace is not thread safe, and unnecessary.
author | nenolod |
---|---|
date | Tue, 04 Jul 2006 00:37:37 -0700 |
parents | d872c88f8c6f |
children | 2449f180912d |
files | ChangeLog Plugins/Input/mpg123/mpg123.c |
diffstat | 2 files changed, 20 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 04 00:25:25 2006 -0700 +++ b/ChangeLog Tue Jul 04 00:37:37 2006 -0700 @@ -1,3 +1,12 @@ +2006-07-04 07:25:25 +0000 William Pitcock <nenolod@nenolod.net> + revision [1648] + - fix a regression involving large ID3 tags being bolted right in the middle of a fraunhofer VBRX TOC (iTunes fucking fails) + + + Changes: Modified: + +5 -9 trunk/Plugins/Input/mpg123/common.c + + 2006-07-01 23:19:46 +0000 Tony Vroon <chainsaw@gentoo.org> revision [1644] Show whether modplug will actually be built (wrong var was being displayed).
--- a/Plugins/Input/mpg123/mpg123.c Tue Jul 04 00:25:25 2006 -0700 +++ b/Plugins/Input/mpg123/mpg123.c Tue Jul 04 00:37:37 2006 -0700 @@ -45,10 +45,6 @@ gchar **mpgdec_id3_encoding_list = NULL; -static TagLib_File *taglib_file; -static TagLib_Tag *taglib_tag; -static const TagLib_AudioProperties *taglib_ap; - const char *mpgdec_id3_genres[GENRE_MAX] = { N_("Blues"), N_("Classic Rock"), N_("Country"), N_("Dance"), N_("Disco"), N_("Funk"), N_("Grunge"), N_("Hip-Hop"), @@ -526,6 +522,8 @@ { VFSFile *file; TitleInput *tuple = NULL; + TagLib_File *taglib_file; + TagLib_Tag *taglib_tag; #ifdef USE_CHARDET taglib_set_strings_unicode(FALSE); @@ -541,7 +539,6 @@ if (taglib_file != NULL) { taglib_tag = taglib_file_tag(taglib_file); - taglib_ap = taglib_file_audioproperties(taglib_file); /* XXX: chainsaw, what is this for? -nenolod */ } if (taglib_tag != NULL) @@ -584,7 +581,9 @@ tuple->file_ext = extname(filename); tuple->length = get_song_time(file); - taglib_file_free(taglib_file); + if (taglib_file != NULL) + taglib_file_free(taglib_file); + taglib_tag_free_strings(); vfs_fclose(file); } @@ -748,9 +747,14 @@ } if (strncasecmp(filename, "http://", 7)) { + TitleInput *tuple = NULL; mpgdec_length = mpgdec_info->num_frames * mpgdec_info->tpf * 1000; if (!mpgdec_title) - mpgdec_title = get_song_title(get_song_tuple(filename)); + { + tuple = get_song_tuple(filename); + mpgdec_title = get_song_title(tuple); + bmp_title_input_free(tuple); + } } else { if (!mpgdec_title)