Commit 8820f0c6 authored by Olivier Aubert's avatar Olivier Aubert

Fix locking issues in (embedded) snapshot code

parent ff3a0f6c
......@@ -84,6 +84,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
vlc_object_release( p_vout );
p_snapshot = ( snapshot_t* ) p_cache->p_private;
vlc_mutex_unlock( &p_cache->object_lock );
vlc_object_destroy( p_cache );
if( p_snapshot )
......
......@@ -524,7 +524,6 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
msg_Err( p_vout, "Could not get snapshot" );
image_HandlerDelete( p_image );
vlc_cond_signal( &p_dest->object_wait );
vlc_mutex_unlock( &p_dest->object_lock );
vlc_object_release( p_dest );
return VLC_EGENERIC;
}
......@@ -537,7 +536,6 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
block_Release( p_block );
image_HandlerDelete( p_image );
vlc_cond_signal( &p_dest->object_wait );
vlc_mutex_unlock( &p_dest->object_lock );
vlc_object_release( p_dest );
return VLC_ENOMEM;
}
......@@ -555,7 +553,6 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
free( p_snapshot );
image_HandlerDelete( p_image );
vlc_cond_signal( &p_dest->object_wait );
vlc_mutex_unlock( &p_dest->object_lock );
vlc_object_release( p_dest );
return VLC_ENOMEM;
}
......@@ -567,7 +564,6 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
/* Unlock the object */
vlc_cond_signal( &p_dest->object_wait );
vlc_mutex_unlock( &p_dest->object_lock );
vlc_object_release( p_dest );
image_HandlerDelete( p_image );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment