[vlc-devel] commit: hotkeys: fix a big object leak and factorize a bit. ( Rémi Duraffort )
git version control
git at videolan.org
Tue May 26 12:17:18 CEST 2009
vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Tue May 26 12:16:36 2009 +0200| [128bfa778d3ea8a038aa3fe3c09616e6c6ced7de] | committer: Rémi Duraffort
hotkeys: fix a big object leak and factorize a bit.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=128bfa778d3ea8a038aa3fe3c09616e6c6ced7de
---
modules/control/hotkeys.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 174458d..9c2c1c3 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -207,13 +207,7 @@ static void Run( intf_thread_t *p_intf )
ClearChannels( p_intf, p_vout );
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Quit" ) );
- if( p_aout )
- vlc_object_release( p_aout );
- if( p_vout )
- vlc_object_release( p_vout );
- if( p_input )
- vlc_object_release( p_input );
- continue;
+ goto cleanup_and_continue;
}
/* Volume and audio actions */
else if( i_action == ACTIONID_VOL_UP )
@@ -498,7 +492,7 @@ static void Run( intf_thread_t *p_intf )
_("Subtitle track: %s"), _("N/A") );
var_Change( p_input, "spu-es", VLC_VAR_FREELIST, &list,
&list2 );
- continue;
+ goto cleanup_and_continue;
}
for( i = 0; i < i_count; i++ )
{
@@ -883,6 +877,7 @@ static void Run( intf_thread_t *p_intf )
}
}
}
+cleanup_and_continue:
if( p_aout )
vlc_object_release( p_aout );
if( p_vout )
More information about the vlc-devel
mailing list