[vlc-commits] commit: Use var_Type to test for the existence of a variable ( even more for a void variable). ( Rémi Duraffort )
git version control
git at videolan.org
Fri Mar 5 08:27:05 CET 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Mar 5 08:24:29 2010 +0100| [53233be7c9e0c459f39ccb3f5a5b5eccc073e036] | committer: Rémi Duraffort
Use var_Type to test for the existence of a variable (even more for a void variable).
Should fix #3385
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53233be7c9e0c459f39ccb3f5a5b5eccc073e036
---
src/input/var.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/input/var.c b/src/input/var.c
index 9b919b6..781ce7c 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -359,7 +359,7 @@ void input_ControlVarNavigation( input_thread_t *p_input )
void input_ControlVarTitle( input_thread_t *p_input, int i_title )
{
input_title_t *t = p_input->p->title[i_title];
- vlc_value_t val, text;
+ vlc_value_t text;
int i;
/* Create/Destroy command variables */
@@ -368,7 +368,7 @@ void input_ControlVarTitle( input_thread_t *p_input, int i_title )
var_Destroy( p_input, "next-chapter" );
var_Destroy( p_input, "prev-chapter" );
}
- else if( var_Get( p_input, "next-chapter", &val ) != VLC_SUCCESS )
+ else if( var_Type( p_input, "next-chapter" ) == 0 )
{
var_Create( p_input, "next-chapter", VLC_VAR_VOID );
text.psz_string = _("Next chapter");
@@ -385,6 +385,7 @@ void input_ControlVarTitle( input_thread_t *p_input, int i_title )
var_Change( p_input, "chapter", VLC_VAR_CLEARCHOICES, NULL, NULL );
for( i = 0; i < t->i_seekpoint; i++ )
{
+ vlc_value_t val;
val.i_int = i;
if( t->seekpoint[i]->psz_name == NULL ||
More information about the vlc-commits
mailing list