[vlc-commits] taglib: Always use IOStream to read the media
Hugo Beauzée-Luyssen
git at videolan.org
Tue Oct 29 11:56:07 CET 2019
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Feb 8 14:38:21 2019 +0100| [4bc7607f31f80264b5e61fbd187f2f8d2f3bb604] | committer: Hugo Beauzée-Luyssen
taglib: Always use IOStream to read the media
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bc7607f31f80264b5e61fbd187f2f8d2f3bb604
---
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;
More information about the vlc-commits
mailing list