[1.0.2] fix wrong condition 83/309383/1 tizen
authorEunhye Choi <eunhae1.choi@samsung.com>
Tue, 9 Apr 2024 08:32:42 +0000 (17:32 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Tue, 9 Apr 2024 08:32:46 +0000 (17:32 +0900)
Change-Id: I17930382e9570c8ba6f37e2ca7783708610e2857

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

index 18b2808..c7424f0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    1.0.1
+Version:    1.0.2
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 01bf26a..234170c 100644 (file)
@@ -300,17 +300,17 @@ __mmplayer_gst_handle_resource_error(mmplayer_t *player, int code, GstMessage *m
                break;
        case GST_RESOURCE_ERROR_NOT_FOUND:
        case GST_RESOURCE_ERROR_OPEN_READ:
-               if (MMPLAYER_IS_HTTP_STREAMING(player) || MMPLAYER_IS_HTTP_LIVE_STREAMING(player)
-                       || MMPLAYER_IS_RTSP_STREAMING(player)) {
+               if (MMPLAYER_IS_STREAMING(player)) {
                        trans_err = MM_ERROR_PLAYER_STREAMING_CONNECTION_FAIL;
                        break;
                }
        case GST_RESOURCE_ERROR_READ:
-               if (MMPLAYER_IS_HTTP_STREAMING(player) || MMPLAYER_IS_HTTP_LIVE_STREAMING(player)
-                       || MMPLAYER_IS_RTSP_STREAMING(player)) {
+               if (MMPLAYER_IS_STREAMING(player)) {
                        trans_err = MM_ERROR_PLAYER_STREAMING_FAIL;
                        break;
-               } else if (message != NULL && message->src != NULL) {
+               }
+
+               if (message != NULL && message->src != NULL) {
                        storage_state_e storage_state = STORAGE_STATE_UNMOUNTABLE;
                        mmplayer_path_type_e path_type = MMPLAYER_PATH_MAX;
 
index dd05d4c..2481186 100644 (file)
@@ -2677,12 +2677,12 @@ __mmplayer_gst_audio_deinterleave_pad_added(GstElement *elem, GstPad *pad, gpoin
 
        __mmplayer_add_sink(player, sink, FALSE);
 
-       if (gst_element_sync_state_with_parent(queue) == GST_STATE_CHANGE_FAILURE) {
+       if (!gst_element_sync_state_with_parent(queue)) {
                LOGE("failed to sync state");
                goto ERROR;
        }
 
-       if (gst_element_sync_state_with_parent(sink) == GST_STATE_CHANGE_FAILURE) {
+       if (!gst_element_sync_state_with_parent(sink)) {
                LOGE("failed to sync state");
                goto ERROR;
        }
@@ -6267,7 +6267,7 @@ _mmplayer_gst_create_decoder(mmplayer_t *player, GstPad *srcpad, const GstCaps *
                        goto ERROR;
                }
 
-               if (gst_element_sync_state_with_parent(queue2) == GST_STATE_CHANGE_FAILURE) {
+               if (!gst_element_sync_state_with_parent(queue2)) {
                        LOGE("failed to sync queue2 state with parent");
                        goto ERROR;
                }
@@ -6335,7 +6335,7 @@ _mmplayer_gst_create_decoder(mmplayer_t *player, GstPad *srcpad, const GstCaps *
                                                                                        "max-size-buffers", 0, NULL);  // disable or automatic
        }
 
-       if (gst_element_sync_state_with_parent(decodebin) == GST_STATE_CHANGE_FAILURE) {
+       if (!gst_element_sync_state_with_parent(decodebin)) {
                LOGE("failed to sync decodebin state with parent");
                goto ERROR;
        }