summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhj kim <backto.kim@samsung.com>2020-03-10 17:11:03 +0900
committerhj kim <backto.kim@samsung.com>2020-03-10 23:29:37 +0000
commit37e3eeb84571265f18ffa64126c38500128acc4e (patch)
tree0d07b951188ed89de30eec354c686d5038fed73c
parent85d57d24145b9979f7dce330fc09b99c31a5f75e (diff)
downloadlibmedia-thumbnail-37e3eeb84571265f18ffa64126c38500128acc4e.tar.gz
libmedia-thumbnail-37e3eeb84571265f18ffa64126c38500128acc4e.tar.bz2
libmedia-thumbnail-37e3eeb84571265f18ffa64126c38500128acc4e.zip
Change-Id: If9064b469c8e1d54fcb9ca50ae669c91fc7e14da
-rwxr-xr-xserver/thumb-server-internal.c14
-rwxr-xr-xsrc/include/media-thumb-internal.h2
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c4
-rwxr-xr-xsrc/media-thumb-internal.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/server/thumb-server-internal.c b/server/thumb-server-internal.c
index 8aecc6b..33716ca 100755
--- a/server/thumb-server-internal.c
+++ b/server/thumb-server-internal.c
@@ -67,13 +67,13 @@ static int __thumbnail_get_data(const char *origin_path, char *thumb_path)
return MS_MEDIA_ERR_NONE;
}
-static int __thumbnail_get_raw_data(const char *origin_path, int *width, int *height, unsigned char **data, int *size)
+static int __thumbnail_get_raw_data(const char *origin_path, unsigned int *width, unsigned int *height, unsigned char **data, size_t *size)
{
int err = MS_MEDIA_ERR_NONE;
- int thumb_width = -1;
- int thumb_height = -1;
+ unsigned int thumb_width = 0;
+ unsigned int thumb_height = 0;
- if (origin_path == NULL || *width <= 0 || *height <= 0) {
+ if (origin_path == NULL || *width == 0 || *height == 0) {
thumb_err("Invalid parameter");
return MS_MEDIA_ERR_INVALID_PARAMETER;
}
@@ -162,9 +162,9 @@ static int __media_thumb_process_raw(thumbMsg *req_msg, thumbMsg *res_msg)
{
int err = MS_MEDIA_ERR_NONE;
unsigned char *data = NULL;
- int thumb_size = 0;
- int thumb_w = 0;
- int thumb_h = 0;
+ size_t thumb_size = 0;
+ unsigned int thumb_w = 0;
+ unsigned int thumb_h = 0;
thumb_retvm_if(!req_msg || !res_msg, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid msg");
diff --git a/src/include/media-thumb-internal.h b/src/include/media-thumb-internal.h
index 29bd362..6876afa 100755
--- a/src/include/media-thumb-internal.h
+++ b/src/include/media-thumb-internal.h
@@ -48,7 +48,7 @@ typedef struct {
} thumbRawUserData;
int _media_thumb_image(const char *origin_path, char *thumb_path, unsigned int thumb_width, unsigned int thumb_height, media_thumb_info *thumb_info);
-int _media_thumb_video(const char *origin_path, const char *thumb_path, int thumb_width, int thumb_height, media_thumb_info *thumb_info);
+int _media_thumb_video(const char *origin_path, const char *thumb_path, unsigned int thumb_width, unsigned int thumb_height, media_thumb_info *thumb_info);
int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path, size_t max_thumb_path, uid_t uid);
#endif /*_MEDIA_THUMB_INTERNAL_H_*/
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index dfbab42..c196f71 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -56,8 +56,8 @@ typedef struct {
bool isRequested;
int request_id;
int source_id;
- int width;
- int height;
+ unsigned int width;
+ unsigned int height;
uid_t uid;
char *path;
thumbRawUserData *userData;
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index c22b8c7..f92093f 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -319,7 +319,7 @@ ERROR:
return MS_MEDIA_ERR_NONE;
}
-int _media_thumb_video(const char *origin_path, const char *thumb_path, int thumb_width, int thumb_height, media_thumb_info *thumb_info)
+int _media_thumb_video(const char *origin_path, const char *thumb_path, unsigned int thumb_width, unsigned int thumb_height, media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
int cdis_value = 0;