Skip to content
Snippets Groups Projects
Commit bbdaa0b6 authored by Alaric Senat's avatar Alaric Senat Committed by Thomas Guillem
Browse files

input: add url parsing of `input-slave` option


As shown in #25549, we need to extract the path from the url in order to
check the file extension without the eventual HTTP's options noise.

Fixes: #25549
Signed-off-by: default avatarThomas Guillem <thomas@gllm.fr>
parent 3de1584a
No related merge requests found
Pipeline #86008 passed with stage
in 19 minutes and 38 seconds
......@@ -984,8 +984,18 @@ static void GetVarSlaves( input_thread_t *p_input,
if( uri == NULL )
continue;
vlc_url_t parsed_uri;
if ( vlc_UrlParse( &parsed_uri, uri ) != VLC_SUCCESS )
{
msg_Err( p_input,
"Invalid url passed to the \"input-slave\" option" );
vlc_UrlClean( &parsed_uri );
free( uri );
continue;
}
enum slave_type i_type;
if ( !input_item_slave_GetType(uri, &i_type) )
if ( !input_item_slave_GetType( parsed_uri.psz_path, &i_type ) )
{
msg_Warn( p_input,
"Can't deduce slave type of `%s\" with file extension.",
......@@ -995,6 +1005,7 @@ static void GetVarSlaves( input_thread_t *p_input,
input_item_slave_t *p_slave =
input_item_slave_New( uri, i_type, SLAVE_PRIORITY_USER );
vlc_UrlClean( &parsed_uri );
free( uri );
if( unlikely( p_slave == NULL ) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment