[vlc-commits] variables: replace var_FreeList() with free()

Rémi Denis-Courmont git at videolan.org
Sun Jun 10 12:11:31 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 10 11:34:45 2018 +0300| [5d31da4ecaeae9a5a2495d63c83a8967b614c4e9] | committer: Rémi Denis-Courmont

variables: replace var_FreeList() with free()

...where applicable.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d31da4ecaeae9a5a2495d63c83a8967b614c4e9
---

 lib/audio.c                |  2 +-
 lib/video.c                |  6 +++---
 modules/control/gestures.c |  4 ++--
 modules/control/hotkeys.c  | 21 +++++++++++----------
 src/audio_output/output.c  |  2 +-
 src/input/input.c          |  2 +-
 6 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/lib/audio.c b/lib/audio.c
index 5ec8687a1c..ff513b3944 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -402,7 +402,7 @@ int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track )
     }
     libvlc_printerr( "Track identifier not found" );
 end:
-    var_FreeList( &val_list, NULL );
+    free( val_list.p_values );
     vlc_object_release( p_input_thread );
     return i_ret;
 }
diff --git a/lib/video.c b/lib/video.c
index d4966fa57d..4c03f015b4 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -375,7 +375,7 @@ int libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu )
     libvlc_printerr( "Track identifier not found" );
 end:
     vlc_object_release (p_input_thread);
-    var_FreeList (&list, NULL);
+    free(list.p_values);
     return i_ret;
 }
 
@@ -462,7 +462,7 @@ static void teletext_enable( input_thread_t *p_input_thread, bool b_enable )
                 var_SetInteger( p_input_thread, "spu-es",
                                 list.p_values[0].i_int );
 
-            var_FreeList( &list, NULL );
+            free(list.p_values);
         }
     }
     else
@@ -592,7 +592,7 @@ int libvlc_video_set_track( libvlc_media_player_t *p_mi, int i_track )
     }
     libvlc_printerr( "Track identifier not found" );
 end:
-    var_FreeList( &val_list, NULL );
+    free(val_list.p_values);
     vlc_object_release( p_input_thread );
     return i_ret;
 }
diff --git a/modules/control/gestures.c b/modules/control/gestures.c
index cf08f92bed..967d8a8b99 100644
--- a/modules/control/gestures.c
+++ b/modules/control/gestures.c
@@ -305,7 +305,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
                 var_SetInteger( p_input, "audio-es",
                                 list.p_values[i].i_int );
             }
-            var_FreeList( &list, NULL );
+            free(list.p_values);
             vlc_object_release( p_input );
             break;
         }
@@ -344,7 +344,7 @@ static void ProcessGesture( intf_thread_t *p_intf )
                 var_SetInteger( p_input, "audio-es",
                                 list.p_values[i].i_int );
             }
-            var_FreeList( &list, NULL );
+            free(list.p_values);
             vlc_object_release( p_input );
             break;
         }
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 0ec2b04c29..593064a6f2 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -638,13 +638,14 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
                 if( count < 1 || val.i_int < 0 )
                 {
                     DisplayMessage( p_vout, _("No active subtitle") );
-                    var_FreeList( &list, NULL );
-                    break;
                 }
-                p_sys->subtitle_delaybookmarks.i_time_subtitle = mdate();
-                DisplayMessage( p_vout,
-                                _("Sub sync: bookmarked subtitle time"));
-                var_FreeList( &list, NULL );
+                else
+                {
+                    p_sys->subtitle_delaybookmarks.i_time_subtitle = mdate();
+                    DisplayMessage(p_vout,
+                                   _("Sub sync: bookmarked subtitle time"));
+                }
+                free(list.p_values);
             }
             break;
         case ACTIONID_SUBSYNC_APPLY:
@@ -708,7 +709,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
                 if( count < 1 || val.i_int < 0 )
                 {
                     DisplayMessage( p_vout, _("No active subtitle") );
-                    var_FreeList( &list, NULL );
+                    free(list.p_values);
                     break;
                 }
                 int64_t i_delay = var_GetInteger( p_input, "spu-delay" ) + diff;
@@ -717,7 +718,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
                 ClearChannels( p_vout, slider_chan );
                 DisplayMessage( p_vout, _( "Subtitle delay %i ms" ),
                                 (int)(i_delay/1000) );
-                var_FreeList( &list, NULL );
+                free(list.p_values);
             }
             break;
         }
@@ -1356,7 +1357,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
                 {
                     DisplayMessage( p_vout,
                                     _("Subtitle position: no active subtitle") );
-                    var_FreeList( &list, NULL );
+                    free(list.p_values);
                     break;
                 }
 
@@ -1368,7 +1369,7 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
 
                 ClearChannels( p_vout, slider_chan );
                 DisplayMessage( p_vout, _( "Subtitle position %d px" ), i_pos );
-                var_FreeList( &list, NULL );
+                free(list.p_values);
             }
             break;
         }
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 6c132668df..f5992e0181 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -482,7 +482,7 @@ static void aout_PrepareStereoMode (audio_output_t *aout,
             if (vals.p_values[i].i_int == i_output_mode)
                 mode_available = true;
         }
-        var_FreeList(&vals, NULL);
+        free(vals.p_values);
     }
     if (!mode_available)
         i_output_mode = i_default_mode;
diff --git a/src/input/input.c b/src/input/input.c
index 50cca381cd..c20f7539d6 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3295,7 +3295,7 @@ static int input_SlaveSourceAdd( input_thread_t *p_input,
         es_out_Control( input_priv(p_input)->p_es_out_display, ES_OUT_SET_ES_DEFAULT_BY_ID, i_id );
         es_out_Control( input_priv(p_input)->p_es_out_display, ES_OUT_SET_ES_BY_ID, i_id );
     }
-    var_FreeList( &list, NULL );
+    free(list.p_values);
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list