if( !p_meta )
return;
+ bool hasTitle = false;
+ bool hasAlbum = false;
+ bool hasTrackNumber = false;
+ bool hasArtist = false;
+ bool hasCopyright = false;
+ bool hasDescription = false;
+ bool hasGenre = false;
+ bool hasDate = false;
+
for( ; i_comment > 0; i_comment-- )
{
char *psz;
if( !strncasecmp(psz, txt, strlen(txt)) ) \
{ \
const char *oldval = vlc_meta_Get( p_meta, vlc_meta_ ## var ); \
- if( oldval ) \
+ if( oldval && has##var) \
{ \
char * newval; \
if( asprintf( &newval, "%s,%s", oldval, &psz[strlen(txt)] ) == -1 ) \
} \
else \
vlc_meta_Set( p_meta, vlc_meta_ ## var, &psz[strlen(txt)] ); \
+ has##var = true; \
}
IF_EXTRACT("TITLE=", Title )
else IF_EXTRACT("ALBUM=", Album )