[0.6.257] fix coverity issue 78/261678/1 accepted/tizen/unified/20210723.122801 submit/tizen/20210722.093020
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 22 Jul 2021 09:03:44 +0000 (18:03 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Thu, 22 Jul 2021 09:03:44 +0000 (18:03 +0900)
Change-Id: I5ba21aa62ca611c0e81fed3b458e6cd757f937c9

packaging/libmm-player.spec
src/mm_player_priv.c

index 65bce65..7e27f27 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.256
+Version:    0.6.257
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 73046be..9700190 100644 (file)
@@ -2121,13 +2121,6 @@ _mmplayer_update_video_overlay_param(mmplayer_t *player, const char *param_name)
 
        MMPLAYER_FENTER();
 
-       mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &curr_type);
-
-       if (curr_type != MM_DISPLAY_SURFACE_OVERLAY && curr_type != MM_DISPLAY_SURFACE_OVERLAY_SYNC_UI) {
-               LOGE("current type(%d) is wrong", curr_type);
-               return MM_ERROR_PLAYER_INTERNAL;
-       }
-
        if (!player || !player->pipeline || !player->pipeline->mainbin || !player->pipeline->videobin ||
                !player->pipeline->videobin[MMPLAYER_V_BIN].gst ||
                !player->pipeline->videobin[MMPLAYER_V_SINK].gst) {
@@ -2135,6 +2128,13 @@ _mmplayer_update_video_overlay_param(mmplayer_t *player, const char *param_name)
                return MM_ERROR_PLAYER_NOT_INITIALIZED;
        }
 
+       mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &curr_type);
+
+       if (curr_type != MM_DISPLAY_SURFACE_OVERLAY && curr_type != MM_DISPLAY_SURFACE_OVERLAY_SYNC_UI) {
+               LOGE("current type(%d) is wrong", curr_type);
+               return MM_ERROR_PLAYER_INTERNAL;
+       }
+
        if (strcmp(player->ini.videosink_element_overlay, "tizenwlsink")) {
                LOGE("invalid videosink [%s]", player->ini.videosink_element_overlay);
                return MM_ERROR_PLAYER_INTERNAL;