[vlc-commits] vlm: restart input on EOS or error
Romain Vimont
git at videolan.org
Thu Aug 22 10:08:44 CEST 2019
vlc/vlc-3.0 | branch: master | Romain Vimont <rom1v at videolabs.io> | Tue Jun 4 15:09:04 2019 +0200| [99427456aef0c9833ade0e1beb989df64be82d1f] | committer: Hugo Beauzée-Luyssen
vlm: restart input on EOS or error
If the current index matches the requested media, we must still restart
the input thread if it reached EOS or finished on error.
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=99427456aef0c9833ade0e1beb989df64be82d1f
---
src/input/vlm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/input/vlm.c b/src/input/vlm.c
index 2158233b5c..ed6a5bd3ff 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -966,9 +966,10 @@ 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 )
+ int state = var_GetInteger( p_input, "state" );
+ if( p_instance->i_index == i_input_index &&
+ state != END_S && state != ERROR_S)
{
- int state = var_GetInteger( p_input, "state" );
if( state == PAUSE_S )
var_SetInteger( p_input, "state", PLAYING_S );
return VLC_SUCCESS;
More information about the vlc-commits
mailing list