[vlc-devel] [PATCH 2/3] taglib: Allow non-local mrls to be analyzed when preparsing

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Jan 23 15:09:22 CET 2019


We don't do this during playback as it can slow down the playback quite
noticeably
---
 modules/meta_engine/taglib.cpp | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 298a108c8c..b617a8ee51 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -834,7 +834,13 @@ static int ReadMeta( vlc_object_t* p_this)
     if( unlikely(psz_uri == NULL) )
         return VLC_ENOMEM;
 
-#if VLC_WINSTORE_APP && TAGLIB_VERSION >= TAGLIB_VERSION_1_11
+#if TAGLIB_VERSION >= TAGLIB_VERSION_1_11
+#if !VLC_WINSTORE_APP
+    if ( p_demux_meta->b_preparsing )
+#else
+    if ( true )
+#endif
+    {
     stream_t *p_stream = vlc_access_NewMRL( p_this, psz_uri );
     free( psz_uri );
     if( p_stream == NULL )
@@ -842,7 +848,10 @@ static int ReadMeta( vlc_object_t* p_this)
 
     VlcIostream s( p_stream );
     f = FileRef( &s );
-#else /* VLC_WINSTORE_APP */
+    }
+    else
+#endif /* TAGLIB_VERSION >= TAGLIB_VERSION_1_11 */
+    {
     char *psz_path = vlc_uri2path( psz_uri );
     free( psz_uri );
     if( psz_path == NULL )
@@ -870,7 +879,7 @@ static int ReadMeta( vlc_object_t* p_this)
     f = FileRef( psz_path );
 #endif
     free( psz_path );
-#endif /* VLC_WINSTORE_APP */
+    }
 
     if( f.isNull() )
         return VLC_EGENERIC;
-- 
2.20.1



More information about the vlc-devel mailing list