[vlc-commits] vlm: remove useless media instance log header
Rémi Denis-Courmont
git at videolan.org
Wed Feb 20 16:36:13 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 19 21:53:13 2019 +0200| [de65b8128bf1f994a0fc9d8b905195b33c9b05b9] | committer: Rémi Denis-Courmont
vlm: remove useless media instance log header
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=de65b8128bf1f994a0fc9d8b905195b33c9b05b9
---
src/input/vlm.c | 46 ++++++++++++++++++++--------------------------
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/src/input/vlm.c b/src/input/vlm.c
index 3b22b42f15..1d556ae369 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -913,7 +913,6 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
{
vlm_media_sys_t *p_media = vlm_ControlMediaGetById( p_vlm, id );
vlm_media_instance_sys_t *p_instance;
- char *psz_log;
if( !p_media || !p_media->cfg.b_enabled || p_media->cfg.i_input <= 0 )
return VLC_EGENERIC;
@@ -1003,35 +1002,30 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
else
input_item_SetURI( p_instance->p_item, p_media->cfg.ppsz_input[p_instance->i_index] ) ;
- if( asprintf( &psz_log, _("Media: %s"), p_media->cfg.psz_name ) != -1 )
+ p_instance->p_input = input_Create( p_instance->p_parent,
+ input_LegacyEvents, NULL,
+ p_instance->p_item, NULL,
+ p_instance->p_input_resource, NULL );
+ if( p_instance->p_input )
{
- p_instance->p_input = input_Create( p_instance->p_parent,
- input_LegacyEvents, NULL,
- p_instance->p_item, psz_log,
- p_instance->p_input_resource,
- NULL );
- if( p_instance->p_input )
- {
- input_LegacyVarInit( p_instance->p_input );
- var_AddCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
-
- if( input_Start( p_instance->p_input ) != VLC_SUCCESS )
- {
- var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
- input_Close( p_instance->p_input );
- p_instance->p_input = NULL;
- }
- }
+ input_LegacyVarInit( p_instance->p_input );
+ var_AddCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
- if( !p_instance->p_input )
+ if( input_Start( p_instance->p_input ) != VLC_SUCCESS )
{
- vlm_MediaInstanceDelete( p_vlm, id, p_instance, p_media );
+ var_DelCallback( p_instance->p_input, "intf-event", InputEvent, p_media );
+ input_Close( p_instance->p_input );
+ p_instance->p_input = NULL;
}
- else
- {
- vlm_SendEventMediaInstanceStarted( p_vlm, id, p_media->cfg.psz_name );
- }
- free( psz_log );
+ }
+
+ if( !p_instance->p_input )
+ {
+ vlm_MediaInstanceDelete( p_vlm, id, p_instance, p_media );
+ }
+ else
+ {
+ vlm_SendEventMediaInstanceStarted( p_vlm, id, p_media->cfg.psz_name );
}
return VLC_SUCCESS;
More information about the vlc-commits
mailing list