From: Sangchul Lee Date: Tue, 23 Feb 2021 10:24:29 +0000 (+0900) Subject: media_streamer_util: Use g_new0 instead of g_malloc0 X-Git-Tag: submit/tizen/20210401.070457~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbe9b2713f910a1a2bc394362b7acdc947f06625;p=platform%2Fcore%2Fapi%2Fmediastreamer.git media_streamer_util: Use g_new0 instead of g_malloc0 To resolve missing casting, it is changed. [Issue type] Improvement [Version] 0.1.132 Change-Id: Ia9336c3391e733613f3743dd7eec2baf1a07a4c8 Signed-off-by: Sangchul Lee --- diff --git a/include/media_streamer_util.h b/include/media_streamer_util.h index 716d0b0..01a756e 100644 --- a/include/media_streamer_util.h +++ b/include/media_streamer_util.h @@ -244,7 +244,7 @@ typedef struct _media_streamer_wl_info_s { #define MS_SET_BOOLEAN_PARAM(obj, key, value) \ do { \ - GValue *val = g_malloc0(sizeof(GValue)); \ + GValue *val = g_new0(GValue, 1); \ g_value_init(val, G_TYPE_BOOLEAN); \ g_value_set_boolean(val, value); \ g_object_set_data_full(G_OBJECT(obj), key, (gpointer)val, ms_param_value_destroy); \ @@ -252,7 +252,7 @@ typedef struct _media_streamer_wl_info_s { #define MS_SET_INT_PARAM(obj, key, value) \ do { \ - GValue *val = g_malloc0(sizeof(GValue)); \ + GValue *val = g_new0(GValue, 1); \ g_value_init(val, G_TYPE_INT); \ g_value_set_int(val, value); \ g_object_set_data_full(G_OBJECT(obj), key, (gpointer)val, ms_param_value_destroy); \ @@ -260,7 +260,7 @@ typedef struct _media_streamer_wl_info_s { #define MS_SET_INT_STATIC_STRING_PARAM(obj, key, value) \ do { \ - GValue *val = g_malloc0(sizeof(GValue)); \ + GValue *val = g_new0(GValue, 1); \ g_value_init(val, G_TYPE_STRING); \ g_value_set_static_string(val, value); \ g_object_set_data_full(G_OBJECT(obj), key, (gpointer)val, ms_param_value_destroy); \ @@ -268,7 +268,7 @@ typedef struct _media_streamer_wl_info_s { #define MS_SET_INT_CAPS_PARAM(obj, key, value) \ do { \ - GValue *val = g_malloc0(sizeof(GValue)); \ + GValue *val = g_new0(GValue, 1); \ g_value_init(val, GST_TYPE_CAPS); \ gst_value_set_caps(val, value); \ g_object_set_data_full(G_OBJECT(obj), key, (gpointer)val, ms_param_value_destroy); \ diff --git a/packaging/capi-media-streamer.spec b/packaging/capi-media-streamer.spec index 2ed5db4..ef84e17 100644 --- a/packaging/capi-media-streamer.spec +++ b/packaging/capi-media-streamer.spec @@ -1,6 +1,6 @@ Name: capi-media-streamer Summary: A Media Streamer API -Version: 0.1.131 +Version: 0.1.132 Release: 0 Group: Multimedia/API License: Apache-2.0