[vlc-commits] commit: Extensions: fix vlc.deactivate() malfunction ( Jean-Philippe André )
git at videolan.org
git at videolan.org
Wed May 5 15:43:15 CEST 2010
vlc/vlc-1.1 | branch: master | Jean-Philippe André <jpeg at videolan.org> | Wed May 5 21:27:52 2010 +0800| [0bf282fd57436bbd9ab2bab5be4c03b43c3f9104] | committer: Jean-Baptiste Kempf
Extensions: fix vlc.deactivate() malfunction
Inspired by jetru's patches, thank you. This should fix #3451
(cherry picked from commit 0a15eecff314dc9f9cb8b9e6d89d1b338dd54948)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=0bf282fd57436bbd9ab2bab5be4c03b43c3f9104
---
modules/misc/lua/extension_thread.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/misc/lua/extension_thread.c b/modules/misc/lua/extension_thread.c
index 9df6bbd..78a2608 100644
--- a/modules/misc/lua/extension_thread.c
+++ b/modules/misc/lua/extension_thread.c
@@ -146,12 +146,16 @@ int Deactivate( extensions_manager_t *p_mgr, extension_t *p_ext )
}
/* Free the list of commands */
- FreeCommands( p_ext->p_sys->command );
+ if( p_ext->p_sys->command )
+ FreeCommands( p_ext->p_sys->command->next );
/* Push command */
struct command_t *cmd = calloc( 1, sizeof( struct command_t ) );
cmd->i_command = CMD_DEACTIVATE;
- p_ext->p_sys->command = cmd;
+ if( p_ext->p_sys->command )
+ p_ext->p_sys->command->next = cmd;
+ else
+ p_ext->p_sys->command = cmd;
vlc_cond_signal( &p_ext->p_sys->wait );
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
More information about the vlc-commits
mailing list