From 90cc494de1495597c735a98ecbdcdd82ecd19935 Mon Sep 17 00:00:00 2001 From: Jiyong Min Date: Mon, 11 Sep 2017 11:08:07 +0900 Subject: [PATCH] Remove unused parameter, the size of the buffer Change-Id: I87b6558f36c45250339996e064b1edd5e0b36810 Signed-off-by: Jiyong Min --- gif/include/mm_util_gif.h | 3 +-- gif/include/mm_util_gif_private.h | 1 - gif/mm_util_gif.c | 6 ++---- gif/test/mm_util_gif_testsuite.c | 2 +- packaging/libmm-utility.spec | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gif/include/mm_util_gif.h b/gif/include/mm_util_gif.h index e534215..7430e3b 100755 --- a/gif/include/mm_util_gif.h +++ b/gif/include/mm_util_gif.h @@ -251,14 +251,13 @@ int mm_util_gif_image_set_delay_time(mm_gif_image_h gif_image_h, const int delay * * @param gif_image_h [in] the handle of the single image. * @param image_data [in] the buffer which has image data. - * @param size [in] the length of the buffer. * @return This function returns zero on success, or negative value with error code. * @remark * @since R1, 2.0 * @see mm_util_gif_image_create * @pre mm_util_gif_image_create */ -int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, const unsigned char *image_data, const unsigned long size); +int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, const unsigned char *image_data); /** * This function destroys the handle of the single image(frame). diff --git a/gif/include/mm_util_gif_private.h b/gif/include/mm_util_gif_private.h index d032df5..fc9d8cd 100755 --- a/gif/include/mm_util_gif_private.h +++ b/gif/include/mm_util_gif_private.h @@ -33,7 +33,6 @@ typedef struct { /* for giflib, Same as SavedImage */ GifImageDesc image_desc; void *image_data; - unsigned long image_data_size; int ext_block_count; ExtensionBlock *ext_blocks; diff --git a/gif/mm_util_gif.c b/gif/mm_util_gif.c index a25c529..d6f3ddc 100755 --- a/gif/mm_util_gif.c +++ b/gif/mm_util_gif.c @@ -1085,18 +1085,16 @@ int mm_util_gif_image_set_color_map(mm_gif_image_h gif_image_h, const int number return MM_UTIL_ERROR_NONE; } -int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, const unsigned char *image_data, const unsigned long size) +int mm_util_gif_image_set_image(mm_gif_image_h gif_image_h, const unsigned char *image_data) { gif_image_s *gif_image = (gif_image_s *)gif_image_h; mm_util_retvm_if(gif_image == NULL, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid parameter"); mm_util_retvm_if(image_data == NULL, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid parameter"); - mm_util_retvm_if(size == 0, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid parameter"); - mm_util_info("ptr = %p, size = %lu", image_data, size); + mm_util_info("ptr = %p", image_data); gif_image->image_data = (void *)image_data; - gif_image->image_data_size = size; return MM_UTIL_ERROR_NONE; } diff --git a/gif/test/mm_util_gif_testsuite.c b/gif/test/mm_util_gif_testsuite.c index 2ef3f76..9512e8a 100755 --- a/gif/test/mm_util_gif_testsuite.c +++ b/gif/test/mm_util_gif_testsuite.c @@ -182,7 +182,7 @@ int main(int argc, char *argv[]) if (files[i].decoded.frames) { ret = mm_util_gif_image_create(gif_file, &gif_image); fprintf(stderr, "\t mm_util_gif_image_create [%d]\n", ret); - ret = mm_util_gif_image_set_image(gif_image, files[i].decoded.frames[0]->data, files[i].decoded.size); + ret = mm_util_gif_image_set_image(gif_image, files[i].decoded.frames[0]->data); fprintf(stderr, "\t mm_util_gif_image_set_image [%d]\n", ret); ret = mm_util_gif_image_set_delay_time(gif_image, 20); fprintf(stderr, "\t mm_util_gif_image_set_delay_time [%d]\n", ret); diff --git a/packaging/libmm-utility.spec b/packaging/libmm-utility.spec index a681c70..65cb041 100755 --- a/packaging/libmm-utility.spec +++ b/packaging/libmm-utility.spec @@ -1,6 +1,6 @@ Name: libmm-utility Summary: Multimedia Framework Utility Library -Version: 0.39 +Version: 0.40 Release: 0 Group: System/Libraries License: Apache-2.0 -- 2.7.4