Change unsigned int to size_t for buffer_size 67/170867/3
authorhj kim <backto.kim@samsung.com>
Fri, 23 Feb 2018 02:43:05 +0000 (11:43 +0900)
committerhj kim <backto.kim@samsung.com>
Fri, 23 Feb 2018 05:25:45 +0000 (05:25 +0000)
Change-Id: Idb5e77b25a02d8ad53f7ada899f365c75be747ec

imgp/mm_util_imgp.c

index 5f6fece..a9fa6e5 100755 (executable)
@@ -201,7 +201,7 @@ static gboolean __mm_select_rotate_plugin(mm_util_color_format_e _format)
        return FALSE;
 }
 
-static int __mm_util_get_crop_image_size(mm_util_color_format_e format, unsigned int width, unsigned int height, unsigned int *imgsize)
+static int __mm_util_get_crop_image_size(mm_util_color_format_e format, unsigned int width, unsigned int height, size_t *imgsize)
 {
        int ret = MM_UTIL_ERROR_NONE;
        unsigned char x_chroma_shift = 0;
@@ -608,7 +608,7 @@ static int __mm_util_processing(mm_util_s *handle)
        }
 
        if (dst_buf[dst_index] != NULL && res_buffer_size != 0) {
-               ret = mm_util_create_color_image((mm_util_color_image_h *)&(handle->dst), (unsigned long)src_width, (unsigned long)src_height, src_format, (void *)dst_buf[dst_index], (size_t)res_buffer_size);
+               ret = mm_util_create_color_image((mm_util_color_image_h *)&(handle->dst), (unsigned long)src_width, (unsigned long)src_height, src_format, (void *)dst_buf[dst_index], res_buffer_size);
                if (ret != MM_UTIL_ERROR_NONE)
                        mm_util_error("mm_util_set_color_image failed");
        }
@@ -1171,7 +1171,7 @@ int mm_util_crop_image(const unsigned char *src, unsigned int src_width, unsigne
 unsigned int crop_start_x, unsigned int crop_start_y, unsigned int crop_dest_width, unsigned int crop_dest_height, unsigned char **dst, unsigned int *result_buf_width, unsigned int *result_buf_height, size_t *result_buf_size)
 {
        int ret = MM_UTIL_ERROR_NONE;
-       unsigned int dst_buf_size = 0;
+       size_t dst_buf_size = 0;
        unsigned char *dst_buffer = NULL;
        unsigned int res_w = 0;
        unsigned int res_h = 0;
@@ -1246,7 +1246,7 @@ unsigned int crop_start_x, unsigned int crop_start_y, unsigned int crop_dest_wid
                ret = MM_UTIL_ERROR_NOT_SUPPORTED_FORMAT;
        }
 
-       *result_buf_size = (size_t)dst_buf_size;
+       *result_buf_size = dst_buf_size;
        *dst = dst_buffer;
        *result_buf_width = res_w;
        *result_buf_height = res_h;