]> git.sesse.net Git - vlc/commitdiff
libvlc: fix logic '||' and not '&&'.
authorRémi Duraffort <ivoire@videolan.org>
Fri, 28 Aug 2009 17:15:25 +0000 (19:15 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 28 Aug 2009 17:15:25 +0000 (19:15 +0200)
src/control/audio.c
src/control/video.c

index 0146bbe9016467e0c4c0252b3130b97b2889e619..a6298af41787bb2bf0e99ff430b50de89285de7c 100644 (file)
@@ -454,7 +454,7 @@ void libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track,
         return;
 
     var_Change( p_input_thread, "audio-es", VLC_VAR_GETCHOICES, &val_list, NULL );
-    if( (i_track < 0) && (i_track > val_list.p_list->i_count) )
+    if( (i_track < 0) || (i_track > val_list.p_list->i_count) )
     {
         libvlc_exception_raise( p_e, "Audio track out of range" );
         goto end;
@@ -509,5 +509,4 @@ void libvlc_audio_set_channel( libvlc_instance_t *p_instance,
 
         vlc_object_release( p_aout );
     }
-
 }
index 78786988448486ef981b0d68345ae3ae8f44eb7a..ffe7e56b8d89aa1b4b6ab2557b42abfd251631d0 100644 (file)
@@ -320,7 +320,7 @@ void libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu,
         goto end;
     }
 
-    if( (i_spu < 0) && (i_spu > val_list.p_list->i_count) )
+    if( (i_spu < 0) || (i_spu > val_list.p_list->i_count) )
     {
         libvlc_exception_raise( p_e, "Subtitle value out of range" );
         goto end;
@@ -699,7 +699,7 @@ int libvlc_video_get_marquee_option_as_int( libvlc_media_player_t *p_mi,
         vlc_object_release(marquee);
         return isEnabled;
     }
-    
+
     /* Generic case */
     if(!identifier)
     {
@@ -724,7 +724,7 @@ char * libvlc_video_get_marquee_option_as_string( libvlc_media_player_t *p_mi,
         libvlc_exception_raise( p_e, "This option is not available" );
         return 0;
     }
-    
+
     vlc_object_t * marquee = get_marquee_object(p_mi);
     if(!marquee)
     {