[vlc-devel] commit: libvlc: fix logic '||' and not '&&'. ( Rémi Duraffort )
git version control
git at videolan.org
Fri Aug 28 19:16:53 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Aug 28 19:15:25 2009 +0200| [f2287d1016b46b3bd582ff31c1b5e6ca3bd97977] | committer: Rémi Duraffort
libvlc: fix logic '||' and not '&&'.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2287d1016b46b3bd582ff31c1b5e6ca3bd97977
---
src/control/audio.c | 3 +--
src/control/video.c | 6 +++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/control/audio.c b/src/control/audio.c
index 0146bbe..a6298af 100644
--- a/src/control/audio.c
+++ b/src/control/audio.c
@@ -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 );
}
-
}
diff --git a/src/control/video.c b/src/control/video.c
index 7878698..ffe7e56 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -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)
{
More information about the vlc-devel
mailing list