vlc | branch: master | Thomas Guillem <tho...@gllm.fr> | Fri Jul 6 10:16:47 2018 +0200| [8ab5192377a86d61b81032440cb9b5549f725897] | committer: Thomas Guillem
podcast: use its own input thread helper This module need a heavy rewrite: lot of missing check of returns functions. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ab5192377a86d61b81032440cb9b5549f725897 --- modules/services_discovery/podcast.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/services_discovery/podcast.c b/modules/services_discovery/podcast.c index 327b58ca3a..690a324718 100644 --- a/modules/services_discovery/podcast.c +++ b/modules/services_discovery/podcast.c @@ -210,6 +210,18 @@ static void Close( vlc_object_t *p_this ) /***************************************************************************** * Run: main thread *****************************************************************************/ +static input_thread_t *InputCreateAndStart( services_discovery_t *sd, + input_item_t *item ) +{ + input_thread_t *input = input_Create( sd, item, NULL, NULL, NULL ); + if( input != NULL && input_Start( input ) ) + { + vlc_object_release( input ); + input = NULL; + } + return input; +} + noreturn static void *Run( void *data ) { services_discovery_t *p_sd = data; @@ -329,7 +341,7 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls ) services_discovery_AddItem( p_sd, p_input ); TAB_APPEND( p_sys->i_input, p_sys->pp_input, - input_CreateAndStart( p_sd, p_input, NULL ) ); + InputCreateAndStart( p_sd, p_input ) ); } else { @@ -404,7 +416,7 @@ static void ParseRequest( services_discovery_t *p_sd ) services_discovery_AddItem( p_sd, p_input ); TAB_APPEND( p_sys->i_input, p_sys->pp_input, - input_CreateAndStart( p_sd, p_input, NULL ) ); + InputCreateAndStart( p_sd, p_input ) ); SaveUrls( p_sd ); } } _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits