[vlc-devel] commit: taglib writer: use decode_URI_duplicate ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Jan 25 17:32:07 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 25 18:31:26 2010 +0200| [a1b2eff0bcc9469fdd7587d9977a66e235a7f6e9] | committer: Rémi Denis-Courmont 

taglib writer: use decode_URI_duplicate

The code looks suspicious though.

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

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

diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 59eda89..1d230f3 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -539,12 +539,9 @@ static int WriteMeta( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    char *export_file = strdup(p_export->psz_file);
-    if( decode_URI( export_file ) == NULL )
-    {
-        free( export_file );
+    char *export_file = decode_URI_duplicate(p_export->psz_file);
+    if( export_file == NULL )
         return VLC_EGENERIC;
-    }
 
 #if defined(WIN32) || defined (UNDER_CE)
     wchar_t wpath[MAX_PATH + 1];




More information about the vlc-devel mailing list