[vlc-devel] commit: hotkeys: fix memleak with var_Change(VLC_VAR_GETCHOICES). ( Rémi Duraffort )

git version control git at videolan.org
Tue May 26 13:28:25 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue May 26 12:00:17 2009 +0200| [1d536ab9f3ebc16211d0e359dc40bae6ce05c3ba] | committer: Rémi Duraffort 

hotkeys: fix memleak with var_Change(VLC_VAR_GETCHOICES).

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

 modules/control/hotkeys.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 0604bea..174458d 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -387,6 +387,8 @@ static void Run( intf_thread_t *p_intf )
                         _("Audio Device: %s"),
                         list2.p_list->p_values[i].psz_string);
             }
+            var_Change( p_aout, "audio-device", VLC_VAR_FREELIST, &list,
+                        &list2 );
         }
         /* Input options */
         else if( p_input )
@@ -478,6 +480,8 @@ static void Run( intf_thread_t *p_intf )
                                      _("Audio track: %s"),
                                      list2.p_list->p_values[i].psz_string );
                 }
+                var_Change( p_input, "audio-es", VLC_VAR_FREELIST, &list,
+                            &list2 );
             }
             else if( i_action == ACTIONID_SUBTITLE_TRACK )
             {
@@ -492,6 +496,8 @@ static void Run( intf_thread_t *p_intf )
                 {
                     vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
                                      _("Subtitle track: %s"), _("N/A") );
+                    var_Change( p_input, "spu-es", VLC_VAR_FREELIST, &list,
+                                &list2 );
                     continue;
                 }
                 for( i = 0; i < i_count; i++ )
@@ -516,6 +522,8 @@ static void Run( intf_thread_t *p_intf )
                 vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
                                  _("Subtitle track: %s"),
                                  list2.p_list->p_values[i].psz_string );
+                var_Change( p_input, "spu-es", VLC_VAR_FREELIST, &list,
+                            &list2 );
             }
             else if( i_action == ACTIONID_ASPECT_RATIO && p_vout )
             {




More information about the vlc-devel mailing list