Clear player data after play thread is stopped 18/261018/2
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 8 Jul 2021 09:59:46 +0000 (18:59 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 8 Jul 2021 12:24:29 +0000 (21:24 +0900)
commit1fdf72f9b4165a39d2d1e2aaf5856aba1ce538bf
tree2d48931bdccbe09e9851afa33cd9c8e4e0f35224
parentf2e5c5789bd0a9f96b269d6c8538a64b835e4687
Clear player data after play thread is stopped

Previous code clears player data before reset the g_playing_info. If play thread still play
some text, race condition of player data(ex. pasued_data) may occur.

This patch changes the order of function call that 'ttsd_player_clear()' is invoked after
play thread is stopped.
By this change, player data is safe to access from other thread.

Change-Id: Ia768cf76a876956a591974f9bc7871dcbdffe1c0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/ttsd_player.c