[vlc-devel] [PATCH v2] input/input: fix `input-slave` option for spus

Rémi Denis-Courmont remi at remlab.net
Tue Mar 30 06:55:44 UTC 2021


Hi,

I don't think that's right. You're just moving the problem from subs to audio and introducing a regression while doing so.

Le 29 mars 2021 18:51:01 GMT+03:00, Alaric Senat <dev.asenat at posteo.net> a écrit :
>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 falls back to spu in case of failure.
>
>Fixes #25549
>---
> src/input/input.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
>diff --git a/src/input/input.c b/src/input/input.c
>index ea64473a0b..aa8280e7b9 100644
>--- a/src/input/input.c
>+++ b/src/input/input.c
>@@ -984,8 +984,17 @@ 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_Warn( p_input,
>+                     "Can't deduce slave type of `%s\": falling back
>to spu.",
>+                     uri );
>+            i_type = SLAVE_TYPE_SPU;
>+        }
>         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

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20210330/06022fea/attachment.html>


More information about the vlc-devel mailing list