vlc | branch: master | Filip Roséen <[email protected]> | Fri Mar 17 03:22:35 2017 +0100| [a07b3174821b085c471b864663b8c659ca0675ee] | committer: Hugo Beauzée-Luyssen
addons/vorepository: use vlc_stream_NewMRL refs: #18131 Signed-off-by: Hugo Beauzée-Luyssen <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a07b3174821b085c471b864663b8c659ca0675ee --- modules/misc/addons/vorepository.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/misc/addons/vorepository.c b/modules/misc/addons/vorepository.c index 6392c958d8..7fcc15b506 100644 --- a/modules/misc/addons/vorepository.c +++ b/modules/misc/addons/vorepository.c @@ -29,6 +29,7 @@ #include <vlc_common.h> #include <vlc_plugin.h> #include <vlc_stream.h> +#include <vlc_stream_extractor.h> #include <vlc_addons.h> #include <vlc_xml.h> #include <vlc_fs.h> @@ -165,7 +166,7 @@ static int ParseManifest( addons_finder_t *p_finder, addon_entry_t *p_entry, addon_file_t *p_file = malloc( sizeof(addon_file_t) ); p_file->e_filetype = i_filetype; p_file->psz_filename = strdup( psz_filename ); - if ( asprintf( & p_file->psz_download_uri, "%s!/%s", + if ( asprintf( & p_file->psz_download_uri, "%s#!/%s", psz_tempfileuri, psz_filename ) > 0 ) { ARRAY_APPEND( p_entry->files, p_file ); @@ -423,18 +424,18 @@ static int Retrieve( addons_finder_t *p_finder, addon_entry_t *p_entry ) msg_Dbg( p_finder, "Reading manifest from %s", p_finder->p_sys->psz_tempfile ); - char *psz_tempfileuri = vlc_path2uri( p_finder->p_sys->psz_tempfile, "unzip" ); + char *psz_tempfileuri = vlc_path2uri( p_finder->p_sys->psz_tempfile, NULL ); if ( !psz_tempfileuri ) return VLC_ENOMEM; char *psz_manifest_uri; - if ( asprintf( &psz_manifest_uri, "%s!/manifest.xml", psz_tempfileuri ) < 1 ) + if ( asprintf( &psz_manifest_uri, "%s#!/manifest.xml", psz_tempfileuri ) < 1 ) { free( psz_tempfileuri ); return VLC_ENOMEM; } - p_stream = vlc_stream_NewURL( p_finder, psz_manifest_uri ); + p_stream = vlc_stream_NewMRL( p_finder, psz_manifest_uri ); free( psz_manifest_uri ); if ( !p_stream ) { @@ -457,11 +458,11 @@ static int FindDesignated( addons_finder_t *p_finder ) char *psz_manifest; const char *psz_path = p_finder->psz_uri + 7; // remove scheme - if ( asprintf( &psz_manifest, "unzip://%s!/manifest.xml", + if ( asprintf( &psz_manifest, "file://%s#!/manifest.xml", psz_path ) < 1 ) return VLC_ENOMEM; - stream_t *p_stream = vlc_stream_NewURL( p_finder, psz_manifest ); + stream_t *p_stream = vlc_stream_NewMRL( p_finder, psz_manifest ); free( psz_manifest ); if ( !p_stream ) return VLC_EGENERIC; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
