Mercurial > audlegacy-plugins
changeset 1004:be2d04b2bd28 trunk
[svn] - move bmp_title_input_free() into file_open() to avoid memory leak.
- make vorbis.c check each tuple member has value.
author | yaz |
---|---|
date | Sun, 06 May 2007 22:53:19 -0700 |
parents | 2c9d1eb6e8a6 |
children | 2346d918470d |
files | ChangeLog src/filewriter/filewriter.c src/filewriter/mp3.c src/filewriter/vorbis.c |
diffstat | 4 files changed, 25 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun May 06 10:59:18 2007 -0700 +++ b/ChangeLog Sun May 06 22:53:19 2007 -0700 @@ -1,3 +1,11 @@ +2007-05-06 17:59:18 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [2170] + - fix itunes7 hack + + trunk/src/alac/demux.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + + 2007-05-05 19:11:33 +0000 Jonathan Schleifer <js@h3c.de> revision [2168] ifdef filewriter/flac.c out completely if FILEWRITER_FLAC isn't defined
--- a/src/filewriter/filewriter.c Sun May 06 10:59:18 2007 -0700 +++ b/src/filewriter/filewriter.c Sun May 06 22:53:19 2007 -0700 @@ -194,6 +194,7 @@ { gchar *origfilename = NULL, *filename = NULL, *temp = NULL; gint pos; + gint rv; if (xmms_check_realtime_priority()) { @@ -270,7 +271,10 @@ if (!output_file) return 0; - return plugin.open(); + rv = plugin.open(); + bmp_title_input_free(tuple); + + return rv; } static void convert_buffer(gpointer buffer, gint length)
--- a/src/filewriter/mp3.c Sun May 06 10:59:18 2007 -0700 +++ b/src/filewriter/mp3.c Sun May 06 22:53:19 2007 -0700 @@ -221,11 +221,8 @@ // id3tag_write_v1(gfp); id3tag_add_v2(gfp); - - bmp_title_input_free(tuple); } - /* input stream description */ lame_set_in_samplerate(gfp, input.frequency);
--- a/src/filewriter/vorbis.c Sun May 06 10:59:18 2007 -0700 +++ b/src/filewriter/vorbis.c Sun May 06 22:53:19 2007 -0700 @@ -86,12 +86,18 @@ { gchar *scratch; - vorbis_comment_add_tag(&vc, "title", tuple->track_name); - vorbis_comment_add_tag(&vc, "artist", tuple->performer); - vorbis_comment_add_tag(&vc, "album", tuple->album_name); - vorbis_comment_add_tag(&vc, "genre", tuple->genre); - vorbis_comment_add_tag(&vc, "date", tuple->date); - vorbis_comment_add_tag(&vc, "comment", tuple->comment); + if (tuple->track_name) + vorbis_comment_add_tag(&vc, "title", tuple->track_name); + if (tuple->performer) + vorbis_comment_add_tag(&vc, "artist", tuple->performer); + if (tuple->album_name) + vorbis_comment_add_tag(&vc, "album", tuple->album_name); + if (tuple->genre) + vorbis_comment_add_tag(&vc, "genre", tuple->genre); + if (tuple->date) + vorbis_comment_add_tag(&vc, "date", tuple->date); + if (tuple->comment) + vorbis_comment_add_tag(&vc, "comment", tuple->comment); if (tuple->track_number) {