[vlc-devel] [vlc-commits] sd: podcast: don't auto play discorered items

Rémi Denis-Courmont remi at remlab.net
Thu May 23 15:03:29 CEST 2019


Hi,

Items are played to get the sub-items, undernthe assumption that the item is a playlist file. This change most likely breaks the functionality.

Le 23 mai 2019 11:21:52 GMT+03:00, Thomas Guillem <git at videolan.org> a écrit :
>vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri May 10
>14:41:40 2019 +0200| [1a7e583dc6b31bddd390f59db72e3cc5e588efb3] |
>committer: Thomas Guillem
>
>sd: podcast: don't auto play discorered items
>
>I don't understand why discoverted items are played here. Only the
>owner of the
>service discovery should make this call.
>
>>
>http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1a7e583dc6b31bddd390f59db72e3cc5e588efb3
>---
>
>modules/services_discovery/podcast.c | 52
>------------------------------------
> 1 file changed, 52 deletions(-)
>
>diff --git a/modules/services_discovery/podcast.c
>b/modules/services_discovery/podcast.c
>index 0113d21731..a29996d59b 100644
>--- a/modules/services_discovery/podcast.c
>+++ b/modules/services_discovery/podcast.c
>@@ -84,10 +84,6 @@ enum {
> 
> typedef struct
> {
>-    /* playlist node */
>-    input_thread_t **pp_input;
>-    int i_input;
>-
>     char **ppsz_urls;
>     int i_urls;
> 
>@@ -130,8 +126,6 @@ static int Open( vlc_object_t *p_this )
> 
>     p_sys->i_urls = 0;
>     p_sys->ppsz_urls = NULL;
>-    p_sys->i_input = 0;
>-    p_sys->pp_input = NULL;
>     p_sys->pp_items = NULL;
>     p_sys->i_items = 0;
>     vlc_mutex_init( &p_sys->lock );
>@@ -181,19 +175,6 @@ static void Close( vlc_object_t *p_this )
>     vlc_cond_destroy( &p_sys->wait );
>     vlc_mutex_destroy( &p_sys->lock );
> 
>-    for( int i = 0; i < p_sys->i_input; i++ )
>-    {
>-        input_thread_t *p_input = p_sys->pp_input[i];
>-        if( !p_input )
>-            continue;
>-
>-        input_Stop( p_input );
>-        input_Close( p_input );
>-
>-        p_sys->pp_input[i] = NULL;
>-    }
>-    free( p_sys->pp_input );
>-
>     for( int i = 0; i < p_sys->i_urls; i++ )
>          free( p_sys->ppsz_urls[i] );
>     free( p_sys->ppsz_urls );
>@@ -209,19 +190,6 @@ 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, input_LegacyEvents,
>NULL, item, NULL, NULL );
>-    if( input != NULL && input_Start( input ) )
>-    {
>-        input_LegacyVarInit( input );
>-        input_Close(input);
>-        input = NULL;
>-    }
>-    return input;
>-}
>-
> noreturn static void *Run( void *data )
> {
>     services_discovery_t *p_sd = data;
>@@ -249,21 +217,6 @@ noreturn static void *Run( void *data )
> 
>         p_sys->b_update = false;
> 
>-        for( int i = 0; i < p_sys->i_input; i++ )
>-        {
>-            input_thread_t *p_input = p_sys->pp_input[i];
>-            int state = var_GetInteger( p_input, "state" );
>-
>-            if( state == END_S || state == ERROR_S )
>-            {
>-                input_Stop( p_input );
>-                input_Close( p_input );
>-
>-                p_sys->pp_input[i] = NULL;
>-                TAB_ERASE(p_sys->i_input, p_sys->pp_input, i);
>-                i--;
>-            }
>-        }
>         vlc_restorecancel (canc);
>     }
>     vlc_cleanup_pop();
>@@ -339,9 +292,6 @@ static void ParseUrls( services_discovery_t *p_sd,
>char *psz_urls )
> 
>             TAB_APPEND( i_new_items, pp_new_items, p_input );
>             services_discovery_AddItem( p_sd, p_input );
>-
>-            TAB_APPEND( p_sys->i_input, p_sys->pp_input,
>-                         InputCreateAndStart( p_sd, p_input ) );
>         }
>         else
>         {
>@@ -417,8 +367,6 @@ static void ParseRequest( services_discovery_t
>*p_sd )
>             TAB_APPEND( p_sys->i_items, p_sys->pp_items, p_input );
>             services_discovery_AddItem( p_sd, p_input );
> 
>-            TAB_APPEND( p_sys->i_input, p_sys->pp_input,
>-                        InputCreateAndStart( p_sd, p_input ) );
>             SaveUrls( p_sd );
>         }
>     }
>
>_______________________________________________
>vlc-commits mailing list
>vlc-commits at videolan.org
>https://mailman.videolan.org/listinfo/vlc-commits

-- 
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/20190523/0c1c6624/attachment.html>


More information about the vlc-devel mailing list