[vlc-devel] [PATCH 1/4] taglib: Always use IOStream to read the media
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Tue Oct 8 18:16:14 CEST 2019
---
modules/meta_engine/taglib.cpp | 33 ++++++---------------------------
1 file changed, 6 insertions(+), 27 deletions(-)
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 8f3299b8f6..c71a66ca58 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -832,40 +832,19 @@ static int ReadMeta( vlc_object_t* p_this)
if( unlikely(psz_uri == NULL) )
return VLC_ENOMEM;
-#if VLC_WINSTORE_APP
- stream_t *p_stream = vlc_access_NewMRL( p_this, psz_uri );
- free( psz_uri );
- if( p_stream == NULL )
- return VLC_EGENERIC;
-
- VlcIostream s( p_stream );
- f = FileRef( &s );
-#else /* VLC_WINSTORE_APP */
- char *psz_path = vlc_uri2path( psz_uri );
- free( psz_uri );
- if( psz_path == NULL )
- return VLC_EGENERIC;
-
if( !b_extensions_registered )
{
FileRef::addFileTypeResolver( &aacresolver );
b_extensions_registered = true;
}
-#if defined(_WIN32)
- wchar_t *wpath = ToWide( psz_path );
- if( wpath == NULL )
- {
- free( psz_path );
+ stream_t *p_stream = vlc_access_NewMRL( p_this, psz_uri );
+ free( psz_uri );
+ if( p_stream == NULL )
return VLC_EGENERIC;
- }
- f = FileRef( wpath );
- free( wpath );
-#else
- f = FileRef( psz_path );
-#endif
- free( psz_path );
-#endif /* VLC_WINSTORE_APP */
+
+ VlcIostream s( p_stream );
+ f = FileRef( &s );
if( f.isNull() )
return VLC_EGENERIC;
--
2.20.1
More information about the vlc-devel
mailing list