Fix SVACE defects 81/100881/2
authorSeungbae Shin <seungbae.shin@samsung.com>
Tue, 29 Nov 2016 12:23:28 +0000 (21:23 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Tue, 29 Nov 2016 12:23:28 +0000 (21:23 +0900)
[Version] 0.3.46
[Profile] Common
[Issue Type] SVACE

Change-Id: I53dcb7508e12831a1bfca607237dd143b134f7c9

packaging/capi-media-audio-io.spec
src/cpp/cpp_audio_io.cpp

index 7c36bf29152f4ef0f15a3def11938e4e7f885d16..82d0e536e168c3b3484d0dfa153cceadeb6db38d 100644 (file)
@@ -1,6 +1,6 @@
 Name:           capi-media-audio-io
 Summary:        An Audio Input & Audio Output library in Tizen Native API
-Version:        0.3.45
+Version:        0.3.46
 Release:        0
 Group:          Multimedia/API
 License:        Apache-2.0
index 10ffe8a538b0ffb92baa2c3a8f2e726d2a207d36..54fcfbea37f1d0f122fa5d24e9b32638a6a5051e 100644 (file)
@@ -390,7 +390,7 @@ int cpp_audio_in_create(int sample_rate, audio_channel_e channel, audio_sample_t
         CAudioInfo audioInfo = __generate_audio_input_info(sample_rate, channel, type);
 
         handle->audioIoHandle = new CAudioInput(audioInfo);
-        if (handle == NULL) {
+        if (handle->audioIoHandle == NULL) {
             THROW_ERROR_MSG(CAudioError::EError::ERROR_OUT_OF_MEMORY, "Failed allocation internal handle");
         }
 
@@ -433,7 +433,7 @@ int cpp_audio_in_create_loopback(int sample_rate, audio_channel_e channel, audio
         CAudioInfo audioInfo = __generate_audio_input_loopback_info(sample_rate, channel, type);
 
         handle->audioIoHandle = new CAudioInput(audioInfo);
-        if (handle == NULL) {
+        if (handle->audioIoHandle == NULL) {
             THROW_ERROR_MSG(CAudioError::EError::ERROR_OUT_OF_MEMORY, "Failed allocation internal handle");
         }
 
@@ -1066,7 +1066,7 @@ int cpp_audio_out_create_new(int sample_rate, audio_channel_e channel, audio_sam
         CAudioInfo audioInfo = __generate_audio_output_info(sample_rate, channel, type, SOUND_TYPE_MEDIA /* default sound_type */);
 
         handle->audioIoHandle = new CAudioOutput(audioInfo);
-        if (handle == NULL) {
+        if (handle->audioIoHandle == NULL) {
             THROW_ERROR_MSG(CAudioError::EError::ERROR_OUT_OF_MEMORY, "Failed allocation internal handle");
         }