[vlc-devel] [PATCH] input/input: fix `input-slave` option for spus
Thomas Guillem
thomas at gllm.fr
Mon Mar 29 11:26:02 UTC 2021
Hello,
Thanks for fixing this regression. I have one remark, cf. bellow.
On Fri, Mar 26, 2021, at 11:15, Alaric Senat wrote:
> Since c34d719f, all files passed by the option `input-slave` were set as
> audio tracks no matter what.
> This commit attempts to deduce the `input-slave` type with its file
> extension and display an error message when we can't deduce the type
> instead of arbitrary falling back to audio.
>
> Fixes #25549
> ---
> src/input/input.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/src/input/input.c b/src/input/input.c
> index ea64473a0b..ed9328c4e2 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -984,8 +984,18 @@ static void GetVarSlaves( input_thread_t *p_input,
> if( uri == NULL )
> continue;
>
> + enum slave_type i_type;
> + if ( !input_item_slave_GetType(uri, &i_type) )
> + {
> + msg_Err( p_input,
> + "Can't deduce slave type of `%s\": extension unknown",
> + uri );
> + free( uri );
> + break;
> + }
I think we should fallback to the SPU type if the extension is unknown.
> input_item_slave_t *p_slave =
> - input_item_slave_New( uri, SLAVE_TYPE_AUDIO, SLAVE_PRIORITY_USER );
> + input_item_slave_New( uri, i_type, SLAVE_PRIORITY_USER );
> +
> free( uri );
>
> if( unlikely( p_slave == NULL ) )
> --
> 2.29.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list