summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjiyong.min <jiyong.min@samsung.com>2020-01-21 00:05:54 (GMT)
committerjiyong.min <jiyong.min@samsung.com>2020-01-21 00:05:54 (GMT)
commit88e017814253db9527ba70aeb87a2f6332cdb487 (patch)
tree7dc3b0616f997d3c0fc3b30111a78cfffadf0ff2 /src
parentd661eba24fd3abfd19822a29e7ce83a1a7ca707e (diff)
downloadlibmedia-thumbnail-tizen.zip
libmedia-thumbnail-tizen.tar.gz
libmedia-thumbnail-tizen.tar.bz2
Change-Id: I7c39443756963cbc327cb32b89bc0d8f0e497dbe
Diffstat (limited to 'src')
-rwxr-xr-xsrc/media-thumb-internal.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index fe2091d..89e4896 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -141,7 +141,6 @@ static void __get_rotation_and_cdis(const char *origin_path, mm_util_magick_rota
MMHandleType tag = (MMHandleType) NULL;
char *p = NULL;
int size = 0;
- char *err_msg = NULL;
int _cdis_value = 0;
mm_util_magick_rotate_type _rot_type = MM_UTIL_ROTATE_NUM;
@@ -153,7 +152,7 @@ static void __get_rotation_and_cdis(const char *origin_path, mm_util_magick_rota
return;
}
- err = mm_file_get_attrs(tag, &err_msg, MM_FILE_TAG_ROTATE, &p, &size, NULL);
+ err = mm_file_get_attrs(tag, MM_FILE_TAG_ROTATE, &p, &size, NULL);
if (err == FILEINFO_ERROR_NONE && size >= 0) {
if (p == NULL) {
_rot_type = MM_UTIL_ROTATE_0;
@@ -171,14 +170,11 @@ static void __get_rotation_and_cdis(const char *origin_path, mm_util_magick_rota
} else {
thumb_dbg("There is NOT tag rotate");
_rot_type = MM_UTIL_ROTATE_0;
- SAFE_FREE(err_msg);
}
- err = mm_file_get_attrs(tag, &err_msg, MM_FILE_TAG_CDIS, &_cdis_value, NULL);
- if (err != FILEINFO_ERROR_NONE) {
+ err = mm_file_get_attrs(tag, MM_FILE_TAG_CDIS, &_cdis_value, NULL);
+ if (err != FILEINFO_ERROR_NONE)
_cdis_value = 0;
- SAFE_FREE(err_msg);
- }
*rot_type = _rot_type;
*cdis_value = _cdis_value;
@@ -195,7 +191,6 @@ static int __get_video_info(int cdis_value, const char *origin_path, int *video_
{
int err = MS_MEDIA_ERR_NONE;
MMHandleType content = (MMHandleType) NULL;
- char *err_msg = NULL;
int _video_track_num = 0;
int _width = 0;
int _height = 0;
@@ -214,10 +209,9 @@ static int __get_video_info(int cdis_value, const char *origin_path, int *video_
return MS_MEDIA_ERR_INTERNAL;
}
- err = mm_file_get_attrs(content, &err_msg, MM_FILE_CONTENT_VIDEO_TRACK_COUNT, &_video_track_num, NULL);
+ err = mm_file_get_attrs(content, MM_FILE_CONTENT_VIDEO_TRACK_COUNT, &_video_track_num, NULL);
if (err != FILEINFO_ERROR_NONE) {
- thumb_err("mm_file_get_attrs fails : %s", err_msg);
- SAFE_FREE(err_msg);
+ thumb_err("mm_file_get_attrs fails : %d", err);
mm_file_destroy_content_attrs(content);
return MS_MEDIA_ERR_INTERNAL;
}
@@ -229,7 +223,7 @@ static int __get_video_info(int cdis_value, const char *origin_path, int *video_
return MS_MEDIA_ERR_NONE;
}
- err = mm_file_get_attrs(content, &err_msg,
+ err = mm_file_get_attrs(content,
MM_FILE_CONTENT_VIDEO_WIDTH,
&_width,
MM_FILE_CONTENT_VIDEO_HEIGHT,
@@ -238,8 +232,7 @@ static int __get_video_info(int cdis_value, const char *origin_path, int *video_
&_size, NULL);
if (err != FILEINFO_ERROR_NONE) {
- thumb_err("mm_file_get_attrs fails : %s", err_msg);
- SAFE_FREE(err_msg);
+ thumb_err("mm_file_get_attrs fails : %d", err);
mm_file_destroy_content_attrs(content);
return MS_MEDIA_ERR_INTERNAL;
}