X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fservices_discovery%2Fpodcast.c;h=b64243e569b4aff8e05306262a451b85619b7a42;hb=0ad4e448d1d8b54a75415370c7e2b56764c2c92b;hp=6fb111b6144ddc474a251581ea1434ce78cf8542;hpb=13ae40b0efc4f1b1ce205d9a057537047fcab3f4;p=vlc diff --git a/modules/services_discovery/podcast.c b/modules/services_discovery/podcast.c index 6fb111b614..b64243e569 100644 --- a/modules/services_discovery/podcast.c +++ b/modules/services_discovery/podcast.c @@ -29,7 +29,7 @@ # include "config.h" #endif -#include +#include #include #include #include @@ -155,17 +155,17 @@ static void Run( services_discovery_t *p_sd ) { services_discovery_sys_t *p_sys = p_sd->p_sys; - char *psz_urls = var_CreateGetString( p_sd, "podcast-urls" ); - free( psz_urls ); /* Gruik ? */ + /* Launch the callback associated with this variable */ + var_Create( p_sd, "podcast-urls", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_AddCallback( p_sd, "podcast-urls", UrlsChange, p_sys ); - while( !p_sd->b_die ) + while( vlc_object_alive (p_sd) ) { int i; if( p_sys->b_update == true ) { msg_Dbg( p_sd, "Update required" ); - psz_urls = var_GetNonEmptyString( p_sd, "podcast-urls" ); + char* psz_urls = var_GetNonEmptyString( p_sd, "podcast-urls" ); if( psz_urls != NULL ) ParseUrls( p_sd, psz_urls ); free( psz_urls );