[vlc-devel] commit: (prev|next)-(chapter|title) is a void variable. Fix aborts. ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Mar 17 17:11:41 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 17 18:10:29 2009 +0200| [3c99a3b267bebe108b2380ae520cba2192bb35df] | committer: Rémi Denis-Courmont
(prev|next)-(chapter|title) is a void variable. Fix aborts.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3c99a3b267bebe108b2380ae520cba2192bb35df
---
modules/control/rc.c | 20 ++++----------------
modules/gui/ncurses.c | 20 ++++----------------
modules/gui/qt4/input_manager.cpp | 8 ++++----
modules/gui/skins2/commands/cmd_dvd.cpp | 16 ++++------------
4 files changed, 16 insertions(+), 48 deletions(-)
diff --git a/modules/control/rc.c b/modules/control/rc.c
index 95fd197..dde5d84 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -1157,15 +1157,9 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
}
}
else if( !strcmp( psz_cmd, "chapter_n" ) )
- {
- val.b_bool = true;
- var_Set( p_input, "next-chapter", val );
- }
+ var_SetVoid( p_input, "next-chapter" );
else if( !strcmp( psz_cmd, "chapter_p" ) )
- {
- val.b_bool = true;
- var_Set( p_input, "prev-chapter", val );
- }
+ var_SetVoid( p_input, "prev-chapter" );
vlc_object_release( p_input );
return VLC_SUCCESS;
}
@@ -1196,15 +1190,9 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
}
}
else if( !strcmp( psz_cmd, "title_n" ) )
- {
- val.b_bool = true;
- var_Set( p_input, "next-title", val );
- }
+ var_SetVoid( p_input, "next-title" );
else if( !strcmp( psz_cmd, "title_p" ) )
- {
- val.b_bool = true;
- var_Set( p_input, "prev-title", val );
- }
+ var_SetVoid( p_input, "prev-title" );
vlc_object_release( p_input );
return VLC_SUCCESS;
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index e0e1820..7d96fee 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1168,34 +1168,22 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
case '[':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "prev-title", val );
- }
+ var_SetVoid( p_sys->p_input, "prev-title" );
ReturnTrue;
case ']':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "next-title", val );
- }
+ var_SetVoid( p_sys->p_input, "next-title" );
ReturnTrue;
case '<':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "prev-chapter", val );
- }
+ var_SetVoid( p_sys->p_input, "prev-chapter" );
ReturnTrue;
case '>':
if( p_sys->p_input )
- {
- val.b_bool = true;
- var_Set( p_sys->p_input, "next-chapter", val );
- }
+ var_SetVoid( p_sys->p_input, "next-chapter" );
ReturnTrue;
case 'p':
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 312dce1..f0b4a1c 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -664,8 +664,8 @@ void InputManager::sectionPrev()
if( hasInput() )
{
int i_type = var_Type( p_input, "next-chapter" );
- var_SetBool( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
- "prev-chapter":"prev-title", true );
+ var_SetVoid( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
+ "prev-chapter":"prev-title" );
}
}
@@ -674,8 +674,8 @@ void InputManager::sectionNext()
if( hasInput() )
{
int i_type = var_Type( p_input, "next-chapter" );
- var_SetBool( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
- "next-chapter":"next-title", true );
+ var_SetVoid( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
+ "next-chapter":"next-title" );
}
}
diff --git a/modules/gui/skins2/commands/cmd_dvd.cpp b/modules/gui/skins2/commands/cmd_dvd.cpp
index 4fe6a95..232f7e5 100644
--- a/modules/gui/skins2/commands/cmd_dvd.cpp
+++ b/modules/gui/skins2/commands/cmd_dvd.cpp
@@ -31,9 +31,7 @@ void CmdDvdNextTitle::execute()
FIND_ANYWHERE );
if( p_input )
{
- vlc_value_t val;
- val.b_bool = true;
- var_Set( p_input, "next-title", val );
+ var_SetVoid( p_input, "next-title" );
vlc_object_release( p_input );
}
}
@@ -46,9 +44,7 @@ void CmdDvdPreviousTitle::execute()
FIND_ANYWHERE );
if( p_input )
{
- vlc_value_t val;
- val.b_bool = true;
- var_Set( p_input, "prev-title", val );
+ var_SetVoid( p_input, "prev-title" );
vlc_object_release( p_input );
}
}
@@ -61,9 +57,7 @@ void CmdDvdNextChapter::execute()
FIND_ANYWHERE );
if( p_input )
{
- vlc_value_t val;
- val.b_bool = true;
- var_Set( p_input, "next-chapter", val );
+ var_SetVoid( p_input, "next-chapter" );
vlc_object_release( p_input );
}
}
@@ -76,9 +70,7 @@ void CmdDvdPreviousChapter::execute()
FIND_ANYWHERE );
if( p_input )
{
- vlc_value_t val;
- val.b_bool = true;
- var_Set( p_input, "prev-chapter", val );
+ var_SetVoid( p_input, "prev-chapter" );
vlc_object_release( p_input );
}
}
More information about the vlc-devel
mailing list