[vlc-devel] commit: libvlc: fix logic. ( Rémi Duraffort )

git version control git at videolan.org
Sat Aug 29 10:09:26 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Sat Aug 29 10:07:59 2009 +0200| [8e70853ad5531c85595d9e76301e9a3421969803] | committer: Rémi Duraffort 

libvlc: fix logic.

Backported from [f2287d1016b46b3bd582ff31c1b5e6ca3bd97977]

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8e70853ad5531c85595d9e76301e9a3421969803
---

 src/control/audio.c |    2 +-
 src/control/video.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/control/audio.c b/src/control/audio.c
index c5dd42f..4a59072 100644
--- a/src/control/audio.c
+++ b/src/control/audio.c
@@ -475,7 +475,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;
diff --git a/src/control/video.c b/src/control/video.c
index 9de2360..7a45d68 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -476,7 +476,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;




More information about the vlc-devel mailing list