[vlc-devel] commit: VLM : Fix a race condition when input event is triggered and vlm_MediaInstanceDelete is called at the same time . ( Sébastien Escudier )
git version control
git at videolan.org
Sun Oct 18 13:17:44 CEST 2009
vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Thu Oct 8 10:05:07 2009 +0200| [5d0f05ab7287efdbd1a3a7c7c3edd7e8b89d9f93] | committer: Rémi Denis-Courmont
VLM : Fix a race condition when input event is triggered and vlm_MediaInstanceDelete is called at the same time.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d0f05ab7287efdbd1a3a7c7c3edd7e8b89d9f93
---
src/input/vlm.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/input/vlm.c b/src/input/vlm.c
index 9440ac2..bc8157f 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -843,6 +843,7 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
if( p_instance->p_input_resource )
input_resource_Delete( p_instance->p_input_resource );
+ TAB_REMOVE( p_media->i_instance, p_media->instance, p_instance );
vlc_gc_decref( p_instance->p_item );
free( p_instance->psz_name );
free( p_instance );
@@ -950,7 +951,6 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
if( !p_instance->p_input )
{
- TAB_REMOVE( p_media->i_instance, p_media->instance, p_instance );
vlm_MediaInstanceDelete( p_vlm, id, p_instance, p_media );
}
else
@@ -975,8 +975,6 @@ static int vlm_ControlMediaInstanceStop( vlm_t *p_vlm, int64_t id, const char *p
if( !p_instance )
return VLC_EGENERIC;
- TAB_REMOVE( p_media->i_instance, p_media->instance, p_instance );
-
vlm_MediaInstanceDelete( p_vlm, id, p_instance, p_media );
return VLC_SUCCESS;
More information about the vlc-devel
mailing list