[vlc-commits] input: automatically select subtitle attachments
Salah-Eddin Shaban
git at videolan.org
Mon Oct 30 15:57:11 CET 2017
vlc | branch: master | Salah-Eddin Shaban <salah at videolan.org> | Mon Oct 30 14:07:47 2017 +0200| [03d1fbd548c5aebb5be6cecd094c9a32704215d4] | committer: Thomas Guillem
input: automatically select subtitle attachments
If no sub track has already been selected via sub-file or autodetection.
Close #18897
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=03d1fbd548c5aebb5be6cecd094c9a32704215d4
---
src/input/input.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index f03448445b..aa55dd7f8f 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1194,8 +1194,11 @@ static void LoadSlaves( input_thread_t *p_input )
{
var_SetString( p_input, "sub-description", a->psz_description ? a->psz_description : "");
- input_SlaveSourceAdd( p_input, SLAVE_TYPE_SPU, psz_mrl,
- SLAVE_ADD_NOFLAG );
+ if( input_SlaveSourceAdd( p_input, SLAVE_TYPE_SPU, psz_mrl,
+ p_forced[ SLAVE_TYPE_SPU ] ?
+ SLAVE_ADD_NOFLAG : SLAVE_ADD_FORCED ) == VLC_SUCCESS )
+ p_forced[ SLAVE_TYPE_SPU ] = true;
+
free( psz_mrl );
/* Don't update item slaves for attachements */
}
More information about the vlc-commits
mailing list