From 1943ff7c94a3352e7890dcaf24634b580f61bdf2 Mon Sep 17 00:00:00 2001 From: coderhyme Date: Wed, 27 Sep 2017 07:31:44 +0900 Subject: [PATCH] [Multimedia] Fixed a deadlock issue of Player.SetPlayPositionAsync. It occurs when the continuation of task is syncrhonous, which is not always. The callback in native holds a mutex, if user code tries to call SetPlayPositionAsync right after awaiting SetPlayPositionAsync. It could be blocked, the mutex is still locked. Change-Id: Ia968ab8d6e01401d3e5ee6551ebf8ae62ac99ea1 Signed-off-by: coderhyme --- src/Tizen.Multimedia.MediaPlayer/Player/Player.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs index 7dd4035..680716b 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs @@ -523,7 +523,7 @@ namespace Tizen.Multimedia { ValidatePlayerState(PlayerState.Ready, PlayerState.Playing, PlayerState.Paused); - var taskCompletionSource = new TaskCompletionSource(); + var taskCompletionSource = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); bool immediateResult = _source is MediaStreamSource; -- 2.7.4