diff -p -up libtunepimp-0.5.3/plugins/mp4/mp4.cpp~ libtunepimp-0.5.3/plugins/mp4/mp4.cpp --- libtunepimp-0.5.3/plugins/mp4/mp4.cpp~ 2009-01-12 12:25:13.000000000 +0100 +++ libtunepimp-0.5.3/plugins/mp4/mp4.cpp 2009-01-12 12:31:29.000000000 +0100 @@ -28,7 +28,7 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> -#include <mp4.h> +#include <mp4v2/mp4v2.h> #include "metadata.h" #include "plugin.h" #ifndef WIN32 @@ -131,7 +131,7 @@ mp4ReadMetadata(metadata_t *mdata, const free(value); } - if (MP4GetMetadataYear(mp4file, &value) && value != NULL) { + if (MP4GetMetadataReleaseDate(mp4file, &value) && value != NULL) { mdata->releaseYear = strtol(value, NULL, 0); free(value); } @@ -232,10 +232,8 @@ mp4ReadMetadata(metadata_t *mdata, const strcpy(mdata->fileFormat, fileName + strlen(fileName) - 3); - if (!MP4Close(mp4file)) - return 0; - - return 1; + MP4Close(mp4file); + return 0; } static int @@ -263,7 +261,7 @@ mp4WriteMetadata(const metadata_t *mdata MP4SetMetadataArtist(mp4file, mdata->artist); sprintf(temp, "%04d", mdata->releaseYear); - MP4SetMetadataYear(mp4file, temp); + MP4SetMetadataReleaseDate(mp4file, temp); MP4SetMetadataAlbum(mp4file, mdata->album); @@ -316,8 +314,8 @@ mp4WriteMetadata(const metadata_t *mdata sprintf(temp, "%d", mdata->nonAlbum); MP4SetMetadataFreeForm(mp4file, "MusicBrainz Non-Album", (u_int8_t *)temp, strlen(temp) + 1); - if (!MP4Close(mp4file)) - return 0; + MP4Close(mp4file); + return 0; #ifndef WIN32 if (!MP4Optimize(utf8ToEncoding(fileName, encoding).c_str()))