[vlc-devel] [PATCHv2 10/13] input/input: split LoadSubtitles with SetSubtitlesOptions
Thomas Guillem
thomas at gllm.fr
Tue May 3 19:02:37 CEST 2016
---
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 fa7a040..49337ba 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1005,9 +1005,8 @@ static void SlaveSort( input_item_slave **pp_slaves, int i_slaves )
qsort( pp_slaves, i_slaves, sizeof(input_item_slave*), SlaveCompare );
}
-static void LoadSubtitles( input_thread_t *p_input )
+static void SetSubtitlesOptions( input_thread_t *p_input )
{
- /* Load subtitles */
/* Get fps and set it if not already set */
const float f_fps = p_input->p->master->f_fps;
if( f_fps > 1.f )
@@ -1027,7 +1026,10 @@ static void LoadSubtitles( input_thread_t *p_input )
const int i_delay = var_CreateGetInteger( p_input, "sub-delay" );
if( i_delay != 0 )
var_SetInteger( p_input, "spu-delay", (mtime_t)i_delay * 100000 );
+}
+static void LoadSubtitles( input_thread_t *p_input )
+{
/* Look for and add subtitle files */
char *psz_subtitle = var_GetNonEmptyString( p_input, "sub-file" );
@@ -1294,6 +1296,7 @@ static int Init( input_thread_t * p_input )
if( !p_input->b_preparsing )
{
StartTitle( p_input );
+ SetSubtitlesOptions( p_input );
LoadSubtitles( p_input );
LoadSlaves( p_input );
InitPrograms( p_input );
--
2.8.0.rc3
More information about the vlc-devel
mailing list