Change unsigned int to size_t for buffer_size 96/170896/2 accepted/tizen/unified/20180226.142329 submit/tizen/20180223.061228
authorhj kim <backto.kim@samsung.com>
Fri, 23 Feb 2018 05:07:31 +0000 (14:07 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Fri, 23 Feb 2018 05:16:02 +0000 (05:16 +0000)
Change-Id: I6029965940b2949fe3b2a2b92edbd4448a9ba6c6

gstcs/include/mm_util_gstcs.h
gstcs/mm_util_gstcs.c

index 316e0d6..41f7e6d 100755 (executable)
@@ -102,7 +102,7 @@ typedef struct _imgp_info_s {
        unsigned int dst_height;
        unsigned int output_stride;
        unsigned int output_elevation;
-       unsigned int buffer_size;
+       size_t buffer_size;
        mm_util_img_rotate_type_e angle;
 } imgp_info_s;
 
index 215e4c2..23fa8ab 100755 (executable)
@@ -324,9 +324,9 @@ static void _mm_get_round_up_width_height(mm_util_color_format_e color_format, u
        gstcs_debug("color_format[%d] width[%u] height[%u] stride[%u], elevation[%u]", color_format, width, height, *stride, *elevation);
 }
 
-static int _mm_setup_image_size(mm_util_color_format_e color_format, unsigned int width, unsigned int height)
+static size_t _mm_setup_image_size(mm_util_color_format_e color_format, unsigned int width, unsigned int height)
 {
-       unsigned int size = 0;
+       size_t size = 0;
 
        gstcs_debug("color_format [%d] width [%u] height [%u]", color_format, width, height);
 
@@ -375,7 +375,7 @@ static int _mm_setup_image_size(mm_util_color_format_e color_format, unsigned in
 static int _mm_push_buffer_into_pipeline(imgp_info_s* pImgp_info, unsigned char *src, gstreamer_s * pGstreamer_s)
 {
        int ret = GSTCS_ERROR_NONE;
-       gsize data_size = 0;
+       size_t data_size = 0;
        GstBuffer* gst_buf = NULL;
 
        gstcs_fenter();
@@ -398,7 +398,7 @@ static int _mm_push_buffer_into_pipeline_new(unsigned char *src, gstreamer_s * p
 {
        int ret = GSTCS_ERROR_NONE;
        GstBuffer *gst_buf = NULL;
-       unsigned int src_size = 0;
+       size_t src_size = 0;
        unsigned char *data = NULL;
 
        gstcs_fenter();
@@ -537,12 +537,12 @@ static int _mm_imgp_gstcs_processing(gstreamer_s* pGstreamer_s, unsigned char *s
                if (pGstreamer_s->output_buffer != NULL) {
                        GstMapInfo mapinfo = GST_MAP_INFO_INIT;
                        gst_buffer_map(pGstreamer_s->output_buffer, &mapinfo, GST_MAP_READ);
-                       int buffer_size = mapinfo.size;
-                       int calc_buffer_size = 0;
+                       size_t buffer_size = mapinfo.size;
+                       size_t calc_buffer_size = 0;
 
                        calc_buffer_size = _mm_setup_image_size(pImgp_info->dst_format, pImgp_info->output_stride, pImgp_info->output_elevation);
 
-                       gstcs_debug("buffer size: %d, calc: %d\n", buffer_size, calc_buffer_size);
+                       gstcs_debug("buffer size[%zu], calc[%zu]", buffer_size, calc_buffer_size);
                        if (buffer_size != calc_buffer_size) {
                                gstcs_debug("Buffer size is different \n");
                                gstcs_debug("unref output buffer");