/* free thread */
if (player->repeat_thread) {
+ MMPLAYER_REPEAT_THREAD_LOCK(player);
player->repeat_thread_exit = TRUE;
MMPLAYER_REPEAT_THREAD_SIGNAL(player);
+ MMPLAYER_REPEAT_THREAD_UNLOCK(player);
g_thread_join(player->repeat_thread);
player->repeat_thread = NULL;
/* free next play thread */
if (player->next_play_thread) {
+ MMPLAYER_NEXT_PLAY_THREAD_LOCK(player);
player->next_play_thread_exit = TRUE;
MMPLAYER_NEXT_PLAY_THREAD_SIGNAL(player);
+ MMPLAYER_NEXT_PLAY_THREAD_UNLOCK(player);
g_thread_join(player->next_play_thread);
player->next_play_thread = NULL;
/* release repeat thread */
if (player->repeat_thread) {
+ MMPLAYER_REPEAT_THREAD_LOCK(player);
player->repeat_thread_exit = TRUE;
MMPLAYER_REPEAT_THREAD_SIGNAL(player);
+ MMPLAYER_REPEAT_THREAD_UNLOCK(player);
LOGD("waitting for repeat thread exit\n");
g_thread_join(player->repeat_thread);
/* release next play thread */
if (player->next_play_thread) {
+ MMPLAYER_NEXT_PLAY_THREAD_LOCK(player);
player->next_play_thread_exit = TRUE;
MMPLAYER_NEXT_PLAY_THREAD_SIGNAL(player);
+ MMPLAYER_NEXT_PLAY_THREAD_UNLOCK(player);
LOGD("waitting for next play thread exit\n");
g_thread_join(player->next_play_thread);