]> git.sesse.net Git - vlc/blobdiff - src/input/vlm.c
Fix off-by-one error
[vlc] / src / input / vlm.c
index 60e96ce0225b9529142abbef628b8ab007ff05d1..57fa336932d71832a2a267f4d8e426966f56c5dc 100644 (file)
@@ -38,8 +38,6 @@
 
 #include <vlc_vlm.h>
 
-#ifdef ENABLE_VLM
-
 #ifndef WIN32
 #   include <sys/time.h>                                   /* gettimeofday() */
 #endif
@@ -515,7 +513,6 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
             for( i = 0; i < p_cfg->i_option; i++ )
                 input_ItemAddOption( p_media->vod.p_item,
                                      p_cfg->ppsz_option[i] );
-            input_ItemAddOption( p_media->vod.p_item, "no-sout-keep" );
 
             asprintf( &psz_header, _("Media: %s"), p_cfg->psz_name );
 
@@ -617,10 +614,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
 
     p_media = malloc( sizeof( vlm_media_sys_t ) );
     if( !p_media )
-    {
-        msg_Err( p_vlm, "out of memory" );
         return VLC_ENOMEM;
-    }
     memset( p_media, 0, sizeof(vlm_media_sys_t) );
 
     if( p_cfg->b_vod )
@@ -796,7 +790,6 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
     if( !p_instance )
     {
         vlm_media_t *p_cfg = &p_media->cfg;
-        const char *psz_keep;
         int i;
 
         p_instance = vlm_MediaInstanceNew( p_vlm, psz_id );
@@ -823,15 +816,6 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
             else
                 input_ItemAddOption( p_instance->p_item, p_cfg->ppsz_option[i] );
         }
-        /* We force the right sout-keep value (avoid using the sout-keep from the global configuration)
-         * FIXME implement input list for VOD (need sout-keep)
-         * */
-        if( !p_cfg->b_vod && p_instance->b_sout_keep )
-            psz_keep = "sout-keep";
-        else
-            psz_keep = "no-sout-keep";
-        input_ItemAddOption( p_instance->p_item, psz_keep );
-
         TAB_APPEND( p_media->i_instance, p_media->instance, p_instance );
     }
 
@@ -1152,48 +1136,3 @@ int vlm_Control( vlm_t *p_vlm, int i_query, ... )
 
     return i_result;
 }
-
-#else /* ENABLE_VLM */
-
-/* We just define an empty wrapper */
-vlm_t *__vlm_New( vlc_object_t *a )
-{
-    msg_Err( a, "VideoLAN manager support is disabled" );
-    return NULL;
-}
-
-void vlm_Delete( vlm_t *a )
-{
-    (void)a;
-}
-
-int vlm_ExecuteCommand( vlm_t *a, const char *b, vlm_message_t **c )
-{
-    abort();
-}
-
-vlm_message_t *vlm_MessageNew( const char *psz_name,
-                               const char *psz_format, ... )
-{
-    (void)psz_name; (void)psz_format;
-    return NULL;
-}
-
-vlm_message_t *vlm_MessageAdd( vlm_message_t *p_message,
-                               vlm_message_t *p_child )
-{
-    abort();
-}
-
-void vlm_MessageDelete( vlm_message_t *a )
-{
-    (void)a;
-}
-
-int vlm_Control( vlm_t *p_vlm, int i_query, ... )
-{
-    (void)p_vlm; (void)i_query;
-    return VLC_EGENERIC;
-}
-
-#endif /* ENABLE_VLM */