From: Eunhye Choi Date: Tue, 9 Apr 2024 08:32:42 +0000 (+0900) Subject: [1.0.2] fix wrong condition X-Git-Tag: accepted/tizen/unified/20240605.153142^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F309383%2F1;hp=2cd63e7eea7e34acf6273e04ded3c5ff0dbe120b;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git [1.0.2] fix wrong condition Change-Id: I17930382e9570c8ba6f37e2ca7783708610e2857 --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 18b2808..c7424f0 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -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 diff --git a/src/mm_player_gst.c b/src/mm_player_gst.c index 01bf26a..234170c 100644 --- a/src/mm_player_gst.c +++ b/src/mm_player_gst.c @@ -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; diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index dd05d4c..2481186 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -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; }