Stop player thread when an error occurs 63/299663/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 5 Oct 2023 12:18:12 +0000 (21:18 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Fri, 6 Oct 2023 07:59:22 +0000 (07:59 +0000)
Change-Id: Iac55d6e61df0b9020d2db9f85e568df73809a898
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit f79ef2c3c99cd78a9e063717eb1378b26f60e201)

server/ttsd_server.c

index fd97cf35aa642c752ef28492d7b1dad702885af1..bf24c21a989c4a402ff2965e2b3a4360f717484d 100644 (file)
@@ -227,6 +227,10 @@ int ttsd_send_error(ttse_error_e error, const char* msg)
 
        ttsd_data_set_synth_control(TTSD_SYNTHESIS_CONTROL_EXPIRED);
 
+       if (0 != ttsd_player_stop(uid)) {
+               SLOG(LOG_WARN, tts_tag(), "[Server] Fail to stop for uid(%u)", uid);
+       }
+
        if (0 != ttsd_data_clear_data(uid))
                SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsd_data_clear_data()");