[Release version 0.2.22] 1. Do not get api_class in case of EVENT message, 2. match... 77/63377/2 accepted/tizen/common/20160323.185719 accepted/tizen/ivi/20160324.010424 accepted/tizen/mobile/20160324.010251 accepted/tizen/tv/20160324.010328 accepted/tizen/wearable/20160324.010358 submit/tizen/20160323.122858
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 23 Mar 2016 11:02:36 +0000 (20:02 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 23 Mar 2016 11:06:10 +0000 (20:06 +0900)
Change-Id: Ib8d8311a916216bac744e956a1061339c97d94f1
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-recorder.spec
src/recorder.c

index a647604..8e3cb05 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-recorder
 Summary:    A Recorder API
-Version:    0.2.21
+Version:    0.2.22
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index d41f0e7..6166237 100644 (file)
@@ -308,7 +308,7 @@ IDLE_EVENT_CALLBACK_DONE:
        g_mutex_unlock(&rec_idle_event->event_mutex);
        g_mutex_clear(&rec_idle_event->event_mutex);
 
-       free(rec_idle_event);
+       g_free(rec_idle_event);
        rec_idle_event = NULL;
 
        return false;
@@ -358,7 +358,7 @@ static void _recorder_remove_idle_event_all(recorder_cb_info_s *cb_info)
                                        if (ret == TRUE) {
                                                g_mutex_clear(&rec_idle_event->event_mutex);
 
-                                               free(rec_idle_event);
+                                               g_free(rec_idle_event);
                                                rec_idle_event = NULL;
 
                                                LOGD("remove idle event done");
@@ -459,7 +459,7 @@ static void *_recorder_msg_handler_func(gpointer data)
                                _client_user_callback(cb_info, rec_msg->recv_msg, event);
                                break;
                        case MUSE_RECORDER_EVENT_CLASS_THREAD_MAIN:
-                               rec_idle_event = (recorder_idle_event_s *)malloc(sizeof(recorder_idle_event_s));
+                               rec_idle_event = g_new0(recorder_idle_event_s, 1);
                                if (rec_idle_event == NULL) {
                                        LOGE("rec_idle_event alloc failed");
                                        break;
@@ -489,7 +489,7 @@ static void *_recorder_msg_handler_func(gpointer data)
                        LOGE("unknown recorder api[%d] message", api);
                }
 
-               free(rec_msg);
+               g_free(rec_msg);
                rec_msg = NULL;
 
                g_mutex_lock(&cb_info->msg_handler_mutex);
@@ -592,8 +592,11 @@ static void *_recorder_msg_recv_func(gpointer data)
                                continue;
                        }
 
-                       if (muse_recorder_msg_get(api_class, parse_str[i]))
-                               LOGD("recorder api_class[%d]", api_class);
+                       if (api != MUSE_RECORDER_CB_EVENT) {
+                               LOGD("check api_class");
+                               if (muse_recorder_msg_get(api_class, parse_str[i]))
+                                       LOGD("recorder api_class[%d]", api_class);
+                       }
 
                        if (api_class == MUSE_RECORDER_API_CLASS_IMMEDIATE) {
                                g_mutex_lock(&cb_info->api_mutex[api]);