[vlc-devel] commit: libvlc_video_set_spu: fix setting to 0 when no SPU is present in the stream (Jean-Paul Saman )
Rémi Denis-Courmont
rem at videolan.org
Sat Mar 7 17:29:21 CET 2009
Le samedi 7 mars 2009 18:19:43 git version control, vous avez écrit :
> + if( val_list.p_list->i_count == 0 )
> + {
> + libvlc_exception_raise( p_e, "Subtitle value out of range" );
> + vlc_object_release( p_input_thread );
> + return;
> + }
> +
> if( (i_spu < 0) && (i_spu > val_list.p_list->i_count) )
> {
> libvlc_exception_raise( p_e, "Subtitle value out of range" );
Should it not rather simply be:
> if( (i_spu < 0) && (i_spu >= val_list.p_list->i_count) )
^
Say you have one SPU. What happens if you ask for SPU 0? SPU 1?
--
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary
More information about the vlc-devel
mailing list