From 4bc7607f31f80264b5e61fbd187f2f8d2f3bb604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr> Date: Fri, 8 Feb 2019 14:38:21 +0100 Subject: [PATCH] taglib: Always use IOStream to read the media --- 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 8f3299b8f657..c71a66ca5860 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; -- GitLab