[1.0.2] fix wrong condition
[platform/core/multimedia/libmm-player.git] / src / mm_player_priv.c
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;
        }