[vlc-commits] Taglib: do not write 0 as track position if tracknumber is ""

Jean-Baptiste Kempf git at videolan.org
Tue May 24 13:42:59 CEST 2011


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue May 24 13:35:21 2011 +0200| [50e585e4a642115794f2e7c8af087d056ec962d5] | committer: Jean-Baptiste Kempf

Taglib: do not write 0 as track position if tracknumber is ""
(cherry picked from commit ea81feee5bf176e15347baf9761ba9525e5a3040)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=50e585e4a642115794f2e7c8af087d056ec962d5
---

 modules/meta_engine/taglib.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 549e876..80ba18f 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -630,11 +630,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 );
 
 



More information about the vlc-commits mailing list