1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-16 16:02:54 +02:00

libvlc apps don't know VLC error codes

This commit is contained in:
Rémi Denis-Courmont 2009-10-05 21:38:27 +03:00
parent 84e1b303e3
commit b79a3de0d3

View File

@ -409,19 +409,17 @@ int libvlc_audio_get_track( libvlc_media_player_t *p_mi,
vlc_value_t val_list; vlc_value_t val_list;
vlc_value_t val; vlc_value_t val;
int i_track = -1; int i_track = -1;
int i_ret = -1;
int i; int i;
if( !p_input_thread ) if( !p_input_thread )
return -1; return -1;
i_ret = var_Get( p_input_thread, "audio-es", &val ); if( var_Get( p_input_thread, "audio-es", &val ) < 0 )
if( i_ret < 0 )
{ {
vlc_object_release( p_input_thread ); vlc_object_release( p_input_thread );
libvlc_exception_raise( p_e ); libvlc_exception_raise( p_e );
libvlc_printerr( "Audio track information not found" ); libvlc_printerr( "Audio track information not found" );
return i_ret; return -1;
} }
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 );