]> git.sesse.net Git - vlc/blobdiff - src/input/var.c
Remove useless test before freeing something.
[vlc] / src / input / var.c
index fa8e04c46ad49661910fa514b2fc484e5ef72fd0..05ec7cc6f66e4b4aec1d8e8cc9b05f4eb9500ee0 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -190,9 +194,14 @@ void input_ControlVarInit ( input_thread_t *p_input )
     {
         /* Special "intf-change" variable, it allows intf to set up a callback
          * to be notified of some changes.
+         *
+         * Add rate-change to inform about rate changin
+         *
          * TODO list all changes warn by this callbacks */
         var_Create( p_input, "intf-change", VLC_VAR_BOOL );
         var_SetBool( p_input, "intf-change", VLC_TRUE );
+        var_Create( p_input, "rate-change", VLC_VAR_BOOL );
+        var_SetBool( p_input, "rate-change", VLC_TRUE );
     }
 #undef ADD_CALLBACK
 }
@@ -319,7 +328,7 @@ void input_ControlVarNavigation( input_thread_t *p_input )
 
             var_Change( p_input, val.psz_string, VLC_VAR_ADDCHOICE,
                         &val2, &text2 );
-            if( text2.psz_string ) free( text2.psz_string );
+            free( text2.psz_string );
         }
 
     }
@@ -377,7 +386,7 @@ void input_ControlVarTitle( input_thread_t *p_input, int i_title )
         }
 
         var_Change( p_input, "chapter", VLC_VAR_ADDCHOICE, &val, &text );
-        if( text.psz_string ) free( text.psz_string );
+        free( text.psz_string );
     }
 }
 
@@ -448,6 +457,9 @@ void input_ConfigVarInit ( input_thread_t *p_input )
     var_Create( p_input, "seekable", VLC_VAR_BOOL );
     val.b_bool = VLC_TRUE; /* Fixed later*/
     var_Change( p_input, "seekable", VLC_VAR_SETVALUE, &val, NULL );
+    var_Create( p_input, "can-pause", VLC_VAR_BOOL );
+    val.b_bool = VLC_TRUE; /* Fixed later*/
+    var_Change( p_input, "can-pause", VLC_VAR_SETVALUE, &val, NULL );
 
     /* */
     var_Create( p_input, "access-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );