int ttsd_player_stop(int uid)
{
pthread_mutex_lock(&g_player_control_mutex);
- int ret = ttsd_player_clear(uid);
- if (0 != ret) {
- SLOG(LOG_ERROR, tts_tag(), "[Player ERROR] Fail to stop player, ret(%d)", ret);
- pthread_mutex_unlock(&g_player_control_mutex);
- return ret;
- }
/* check whether uid is current playing or not */
if (NULL != g_playing_info) {
SLOG(LOG_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
}
+
+ int ret = ttsd_player_clear(uid);
+ if (0 != ret) {
+ SLOG(LOG_ERROR, tts_tag(), "[Player ERROR] Fail to stop player, ret(%d)", ret);
+ pthread_mutex_unlock(&g_play_thread_mutex);
+ pthread_mutex_unlock(&g_player_control_mutex);
+ return ret;
+ }
pthread_mutex_unlock(&g_play_thread_mutex);
SLOG(LOG_INFO, tts_tag(), "[Player SUCCESS] Stop player : uid(%d)", uid);