Add to set audio handles as NULL 71/239971/1 accepted/tizen/6.0/unified/20201030.104907 accepted/tizen/6.0/unified/hotfix/20201102.235340 accepted/tizen/unified/20200731.145627 submit/tizen/20200731.062014 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 tizen_6.0.m2_release
authorsooyeon.kim <sooyeon.kim@samsung.com>
Fri, 31 Jul 2020 06:04:08 +0000 (15:04 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Fri, 31 Jul 2020 06:04:08 +0000 (15:04 +0900)
Change-Id: I5bd36e406a7021764fc469b7f639d56e77a89687
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
server/vcd_recorder.c

index dddc02c321fa705b68bd4d0689c9bfacca373aeb..8695383e60afdd5539236373e6b831458b1ce0d3 100644 (file)
@@ -559,14 +559,17 @@ int vcd_recorder_destroy()
        int ret = sound_manager_remove_device_connection_changed_cb(g_device_id);
        if (0 != ret)
                SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Fail to remove device connection changed callback, ret(%d)", ret);
+       g_device_id = -1;
 
        ret = sound_manager_destroy_stream_information(g_stream_info_h);
        if (0 != ret)
                SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Fail to destroy stream info, ret(%d)", ret);
+       g_stream_info_h = NULL;
 
        ret = audio_in_destroy(g_audio_h);
        if (0 != ret)
                SLOG(LOG_ERROR, TAG_VCD, "[Recorder ERROR] Fail to audio in destroy, ret(%d)", ret);
+       g_audio_h = NULL;
 
 #ifdef TV_FFV_MODE
        if (NULL != g_farfieldvoice_h) {
@@ -679,6 +682,7 @@ int vcd_recorder_set(const char* audio_type, vce_audio_type_e type, int rate, in
                if (g_audio_type != type || g_audio_rate != rate || g_audio_channel != channel) {
                        SLOG(LOG_INFO, TAG_VCD, "[Recorder] New audio type(%d) rate(%d) channel(%d)", type, rate, channel);
                        audio_in_destroy(g_audio_h);
+                       g_audio_h = NULL;
 
                        audio_channel_e audio_ch = AUDIO_CHANNEL_MONO;
                        audio_sample_type_e audio_sample_type;
@@ -908,6 +912,7 @@ static void __check_audio_format()
        if (g_audio_type != type || g_audio_rate != rate || g_audio_channel != channel) {
                SLOG(LOG_INFO, TAG_VCD, "[Recorder] New audio type(%d) rate(%d) channel(%d)", type, rate, channel);
                audio_in_destroy(g_audio_h);
+               g_audio_h = NULL;
 
                audio_channel_e audio_ch;
                audio_sample_type_e audio_type;