Fix critical section for checking thread status
If there are multi client handles exist, uid that wants to stop or pause can be different from uid
that is played on sub thread.
However, previous code always checks thread status although uid is not the same as played uid.
If it is different, 'ttsd_player_stop()' does not stop the thread because the uid is not
playing.
By this thread status check, deadlock can occur.
This patch makes critical section for checking thread status only when 'g_playing_info' is set as
NULL. 'g_playing_info' becomes NULL means that play thread should stop.
Change-Id: I3d073d2ea49fb5d139ce6f2a2865c168538be3ef
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>