[Multimedia] Modified the logic handling a task of the ThumbanailExtractor not to... 18/151618/1
authorcoderhyme <jhyo.kim@samsung.com>
Thu, 21 Sep 2017 09:00:15 +0000 (18:00 +0900)
committercoderhyme <jhyo.kim@samsung.com>
Thu, 21 Sep 2017 09:00:15 +0000 (18:00 +0900)
Change-Id: I90bbd964222c6dfa5563328ca2b066eb7a0a8ebe
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
src/Tizen.Multimedia.Util/ThumbnailExtractor/ThumbnailExtractor.cs

index c9ff018..4ec117b 100755 (executable)
@@ -199,11 +199,11 @@ namespace Tizen.Multimedia.Util
                         byte[] tmpBuf = new byte[dataSize];
                         Marshal.Copy(thumbData, tmpBuf, 0, dataSize);
 
-                        tcs.SetResult(new ThumbnailExtractionResult(tmpBuf, thumbWidth, thumbHeight));
+                        tcs.TrySetResult(new ThumbnailExtractionResult(tmpBuf, thumbWidth, thumbHeight));
                     }
                     catch (Exception e)
                     {
-                        tcs.SetException(new InvalidOperationException("[" + error + "] Failed to copy data.", e));
+                        tcs.TrySetException(new InvalidOperationException("[" + error + "] Failed to copy data.", e));
                     }
                     finally
                     {
@@ -212,7 +212,7 @@ namespace Tizen.Multimedia.Util
                 }
                 else
                 {
-                    tcs.SetException(error.ToException("Failed to extract."));
+                    tcs.TrySetException(error.ToException("Failed to extract."));
                 }
             };
         }