[vlc-commits] commit: lua_meta: factorize. ( Rémi Duraffort )
    git at videolan.org 
    git at videolan.org
       
    Wed Sep 29 18:47:43 CEST 2010
    
    
  
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Sep 26 21:02:09 2010 +0200| [d80fc2d2f0b7188a9d500dd8cac0aa265be6e0b1] | committer: Rémi Duraffort 
lua_meta: factorize.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d80fc2d2f0b7188a9d500dd8cac0aa265be6e0b1
---
 modules/misc/lua/meta.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/modules/misc/lua/meta.c b/modules/misc/lua/meta.c
index 019c657..650fb0d 100644
--- a/modules/misc/lua/meta.c
+++ b/modules/misc/lua/meta.c
@@ -180,7 +180,7 @@ static int fetch_art( vlc_object_t *p_this, const char * psz_filename,
 }
 
 /*****************************************************************************
- * Called through lua_scripts_batch_execute to call 'fetch_art' on the script
+ * Called through lua_scripts_batch_execute to call 'read_meta' on the script
  * pointed by psz_filename.
  *****************************************************************************/
 static int read_meta( vlc_object_t *p_this, const char * psz_filename,
@@ -192,15 +192,10 @@ static int read_meta( vlc_object_t *p_this, const char * psz_filename,
         return VLC_EGENERIC;
 
     int i_ret = run(p_this, psz_filename, L, "read_meta");
-    if(i_ret != VLC_SUCCESS)
-    {
-        lua_close( L );
-        return i_ret;
-    }
-
-    // Continue, all "meta reader" are always run.
     lua_close( L );
-    return 1;
+
+    // Continue even if an error occured: all "meta reader" are always run.
+    return i_ret == VLC_SUCCESS ? VLC_EGENERIC : i_ret;
 }
 
 
    
    
More information about the vlc-commits
mailing list