[0.6.106] fix state transition issue 65/177465/2 submit/tizen/20180502.035414
authorEunhae Choi <eunhae1.choi@samsung.com>
Mon, 30 Apr 2018 07:50:39 +0000 (16:50 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Mon, 30 Apr 2018 07:58:15 +0000 (16:58 +0900)
- there is state transition error during buffering.
- player_start
  -> buffering start(async pause) : not finished
     state : (p)paused, (c)playing, (p)paused, (t)playing
  -> buffering stop(async resume) : not finished
     state : (p)paused, (c)PLAYING, (p)PLAYING, (t)playing
  -> player_pause

  if there is a new pause request in case the buffering handling is not completed
  (== current : playing, pending : playing)
  the request will get failed.

Change-Id: I5f59eb28baa96bef67434d54fb4ee73733d8c771

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

index bab2fef56b8ea34bd519a0339a63c0625440de06..494c4c22914dbd9a2df5f1f3907dd9b9daef1f6a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.105
+Version:    0.6.106
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 87eab9c2e7af2f267b2944f63d3c616108e88884..65ffb2e512b2690b083bd896631677025c7f229e 100755 (executable)
@@ -836,6 +836,12 @@ __mmplayer_handle_buffering_message(mm_player_t* player)
                                        /* NOTE: It should be worked as asynchronously.
                                         * Because, buffering can be completed during autoplugging when pipeline would try to go playing state directly.
                                         */
+                                       if (current_state == MM_PLAYER_STATE_PLAYING) {
+                                               /* NOTE: If the current state is PLAYING, it means, async __gst_pause() is not completed yet.
+                                                * The current state should be changed to paused purposely to prevent state conflict.
+                                                */
+                                               MMPLAYER_SET_STATE(player, MM_PLAYER_STATE_PAUSED);
+                                       }
                                        __gst_resume(player, TRUE);
                                        break;
 
@@ -5721,7 +5727,7 @@ __mmplayer_gst_create_text_pipeline(mm_player_t* player)
                return MM_ERROR_PLAYER_INVALID_URI;
        }
 
-       LOGD("subtitle file path is [%s].\n", subtitle_uri);
+       SECURE_LOGD("subtitle file path is [%s].\n", subtitle_uri);
 
        MMPLAYER_SUBTITLE_INFO_LOCK(player);
        player->subtitle_language_list = NULL;