[Multimedia] Fixed bugs. 38/158738/1
authorcoderhyme <jhyo.kim@samsung.com>
Thu, 2 Nov 2017 23:21:32 +0000 (08:21 +0900)
committerJungHo Kim <jhyo.kim@samsung.com>
Thu, 2 Nov 2017 23:22:46 +0000 (23:22 +0000)
- Index error in ObjectDescriptionBuilder.

- For Player, The display should be set in the PrepareAsync method every time, because the native implementation automatically resets display setting when unprepared.

Change-Id: I4778dba2ffe0332223fc88088d9adae4b756d846
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs
src/Tizen.Multimedia.MediaPlayer/Player/Player.cs
src/Tizen.Multimedia.Metadata/ObjectDescriptionBuilder.cs

index 6dc0322..70e66fa 100644 (file)
@@ -265,7 +265,6 @@ namespace Tizen.Multimedia
 
                     throw new ArgumentException("The display has already been assigned to another.");
                 }
-                SetDisplay(value).ThrowIfFailed("Failed to set the display to the player");
 
                 ReplaceDisplay(value);
             }
index 6eece57..ffb066b 100644 (file)
@@ -271,6 +271,8 @@ namespace Tizen.Multimedia
 
             ValidatePlayerState(PlayerState.Idle);
 
+            SetDisplay(_display).ThrowIfFailed("Failed to configure display of the player");
+
             OnPreparing();
 
             var completionSource = new TaskCompletionSource<bool>();
index 96f1f68..44c7802 100644 (file)
@@ -50,7 +50,7 @@ namespace Tizen.Multimedia
             }
             if (sb.Length >= 2)
             {
-                sb.Remove(sb.Length - 1, 2);
+                sb.Remove(sb.Length - 2, 2);
             }
 
             return sb.ToString();