[0.3.126] Don't check main thread if the display_type is NONE, In the set_display... 01/227501/1
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 12 Mar 2020 05:43:09 +0000 (14:43 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 12 Mar 2020 07:32:37 +0000 (16:32 +0900)
Change-Id: Ibdfd63d96d46b51dac8f69232a1f7df33aab604f

packaging/capi-media-player.spec
src/player.c

index 046e8c5..78e7cbc 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-player
 Summary:    A Media Player API
-Version:    0.3.125
+Version:    0.3.126
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index ffe6769..7f4eab4 100644 (file)
@@ -3072,10 +3072,12 @@ int player_set_display(player_h player, player_display_type_e type, player_displ
 
        LOGD("ENTER");
 
-       LOGD("Check if API is called in main thread. pid [%d], tid [%d]", pid, tid);
-       if (pid != tid) {
-               LOGE("API isn't called in main thread");
-               return PLAYER_ERROR_INVALID_OPERATION;
+       if (type != PLAYER_DISPLAY_TYPE_NONE) {
+               LOGD("Check if API is called in main thread. pid [%d], tid [%d]", pid, tid);
+               if (pid != tid) {
+                       LOGE("API isn't called in main thread");
+                       return PLAYER_ERROR_INVALID_OPERATION;
+               }
        }
 
        PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);