]> git.sesse.net Git - vlc/blobdiff - modules/control/rc.c
Create a function to free the memory allocated when calling
[vlc] / modules / control / rc.c
index 1303d219afe37c29bbf13cbc01284ec8b3b4fb03..cb8c23705ab58f3572c71f2deb56c286f65cf983 100644 (file)
@@ -1153,8 +1153,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
                             &val_list, NULL );
                 msg_rc( "Currently playing chapter %d/%d.",
                         val.i_int, val_list.p_list->i_count );
-                var_Change( p_this, "chapter", VLC_VAR_FREELIST,
-                            &val_list, NULL );
+                var_FreeList( &val_list, NULL );
             }
         }
         else if( !strcmp( psz_cmd, "chapter_n" ) )
@@ -1186,8 +1185,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
                             &val_list, NULL );
                 msg_rc( "Currently playing title %d/%d.",
                         val.i_int, val_list.p_list->i_count );
-                var_Change( p_this, "title", VLC_VAR_FREELIST,
-                            &val_list, NULL );
+                var_FreeList( &val_list, NULL );
             }
         }
         else if( !strcmp( psz_cmd, "title_n" ) )
@@ -1262,8 +1260,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
                     msg_rc( "| %i - %s", val.p_list->p_values[i].i_int,
                             text.p_list->p_values[i].psz_string );
             }
-            var_Change( p_input, psz_variable, VLC_VAR_FREELIST,
-                        &val, &text );
+            var_FreeList( &val, &text );
             msg_rc( "+----[ end of %s ]", val_name.psz_string );
 
             free( val_name.psz_string );
@@ -1792,8 +1789,7 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd,
             }
             free( psz_value );
         }
-        var_Change( p_vout, psz_variable, VLC_VAR_FREELIST,
-                    &val, &text );
+        var_FreeList( &val, &text );
         msg_rc( "+----[ end of %s ]", val_name.psz_string );
 
         free( val_name.psz_string );
@@ -1880,8 +1876,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
                 msg_rc( "| %i - %s", val.p_list->p_values[i].i_int,
                         text.p_list->p_values[i].psz_string );
         }
-        var_Change( (vlc_object_t *)p_aout, psz_variable, VLC_VAR_FREELIST,
-                    &val, &text );
+        var_FreeList( &val, &text );
         msg_rc( "+----[ end of %s ]", val_name.psz_string );
 
         free( val_name.psz_string );