]> git.sesse.net Git - vlc/commitdiff
Taglib: do not write 0 as track position if tracknumber is ""
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 24 May 2011 11:35:21 +0000 (13:35 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 24 May 2011 11:35:21 +0000 (13:35 +0200)
modules/meta_engine/taglib.cpp

index 6d2ca07bd1bec3246e57e0bac2846e9aa6a231a1..ce9597629932c0abf34f1d432dbcfb29b0edbbd5 100644 (file)
@@ -655,11 +655,11 @@ static int WriteMeta( vlc_object_t *p_this )
 #undef SET
 
     psz_meta = input_item_GetDate( p_item );
-    if( psz_meta ) p_tag->setYear( atoi( psz_meta ) );
+    if( !EMPTY_STR(psz_meta) ) p_tag->setYear( atoi( psz_meta ) );
     free( psz_meta );
 
     psz_meta = input_item_GetTrackNum( p_item );
-    if( psz_meta ) p_tag->setTrack( atoi( psz_meta ) );
+    if( !EMPTY_STR(psz_meta) ) p_tag->setTrack( atoi( psz_meta ) );
     free( psz_meta );