vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Fri Jun 5 22:05:28 2015 +0300| [72b8c9e5a50f000d80b21011e3c97c441820fd40] | committer: Rémi Denis-Courmont
vlm: use input "state" variable instead of b_eof/b_error > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72b8c9e5a50f000d80b21011e3c97c441820fd40 --- src/input/vlm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/input/vlm.c b/src/input/vlm.c index 06ce761..cf69ade 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -424,8 +424,11 @@ static void* Manage( void* p_object ) for( j = 0; j < p_media->i_instance; ) { vlm_media_instance_sys_t *p_instance = p_media->instance[j]; + int state = INIT_S; - if( p_instance->p_input && ( p_instance->p_input->b_eof || p_instance->p_input->b_error ) ) + if( p_instance->p_input != NULL ) + state = var_GetInteger( p_instance->p_input, "state" ); + if( state == END_S || state == ERROR_S ) { int i_new_input_index; @@ -985,15 +988,14 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char * input_thread_t *p_input = p_instance->p_input; if( p_input ) { - if( p_instance->i_index == i_input_index && - !p_input->b_eof && !p_input->b_error ) + if( p_instance->i_index == i_input_index ) { - if( var_GetInteger( p_input, "state" ) == PAUSE_S ) + int state = var_GetInteger( p_input, "state" ); + if( state == PAUSE_S ) var_SetInteger( p_input, "state", PLAYING_S ); return VLC_SUCCESS; } - input_Stop( p_input ); input_Close( p_input ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
