Commit 8e70853a authored by Rémi Duraffort's avatar Rémi Duraffort

libvlc: fix logic.

Backported from [f2287d10]
parent d2356fcc
...@@ -475,7 +475,7 @@ void libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track, ...@@ -475,7 +475,7 @@ void libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track,
return; return;
var_Change( p_input_thread, "audio-es", VLC_VAR_GETCHOICES, &val_list, NULL ); 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" ); libvlc_exception_raise( p_e, "Audio track out of range" );
goto end; goto end;
......
...@@ -476,7 +476,7 @@ void libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu, ...@@ -476,7 +476,7 @@ void libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu,
goto end; 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" ); libvlc_exception_raise( p_e, "Subtitle value out of range" );
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment