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

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


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

Taglib: do not write 0 as track position if tracknumber is ""

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

 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 6d2ca07..ce95976 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -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 );
 
 



More information about the vlc-commits mailing list