aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-07-24 02:54:19 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-07-24 02:54:19 +0000
commitcdb6372049109653fee52216e97640d8f8e7ecd1 (patch)
tree5aeb7aa585a79a7e8634397ef119ab99b366391a
parent4d4ef9d9873d81bab59faac22683a0ef07e59b51 (diff)
downloadmpd-cdb6372049109653fee52216e97640d8f8e7ecd1.tar.gz
mpd-cdb6372049109653fee52216e97640d8f8e7ecd1.tar.xz
mpd-cdb6372049109653fee52216e97640d8f8e7ecd1.zip
1) fix bug, id3_tag_parse does may return NULL if there's an error in decoding the id3v2 tag
2) in the same place, delete the id3Tag (fixes a memory leak) 3) version: 0.12.0 -> 0.11.4 git-svn-id: https://svn.musicpd.org/mpd/trunk@1903 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--configure.ac2
-rw-r--r--src/inputPlugins/mp3_plugin.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 396a2e624..617a048f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl AC_INIT(src/main.c)
dnl AM_INIT_AUTOMAKE(mpd, 0.10.0)
AC_PREREQ(2.52)
-AC_INIT(mpd, 0.12.0, shank@mercury.chem.pitt.edu)
+AC_INIT(mpd, 0.11.4, shank@mercury.chem.pitt.edu)
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
dnl MAD wants this stuff
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 73d9379a5..db5756b95 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -246,7 +246,10 @@ static MpdTag * mp3_parseId3Tag(mp3DecodeData * data, signed long tagsize) {
id3Tag = id3_tag_parse(id3_data, tagsize);
- ret = parseId3Tag(id3Tag);
+ if(id3Tag) {
+ ret = parseId3Tag(id3Tag);
+ id3_tag_delete(id3Tag);
+ }
fail:
if(allocated) free(allocated);
@@ -272,7 +275,8 @@ int decodeNextFrameHeader(mp3DecodeData * data, MpdTag ** tag) {
if(tagsize>0) {
if(tag && !(*tag)) {
- *tag =mp3_parseId3Tag(data, tagsize);
+ *tag = mp3_parseId3Tag(data, tagsize);
+
}
else {
mad_stream_skip(&(data->stream),