]> git.sesse.net Git - vlc/commitdiff
(prev|next)-(chapter|title) is a void variable. Fix aborts.
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Mar 2009 16:10:29 +0000 (18:10 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Mar 2009 16:11:32 +0000 (18:11 +0200)
modules/control/rc.c
modules/gui/ncurses.c
modules/gui/qt4/input_manager.cpp
modules/gui/skins2/commands/cmd_dvd.cpp

index 95fd197c4fc90441feb7e5303bfca660ea3a9eea..dde5d84e897b1177b5111d043de95df94c96fc90 100644 (file)
@@ -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;
index e0e1820139c41cac6b8490a177f31a4c1e27f894..7d96feefa82ffb88e6770264bf7b669759257dbf 100644 (file)
@@ -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':
index 312dce101a950b3442f5159ae5cc9a51358ea29f..f0b4a1c5be3d3741b1fac4abd14285d5aea4d2b8 100644 (file)
@@ -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" );
     }
 }
 
index 4fe6a95d9c0cc96c97834d5d89042f67101ed0ed..232f7e5d2521ee5ba2af0913d460f67b2c737240 100644 (file)
@@ -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 );
     }
 }