summaryrefslogtreecommitdiff
path: root/src/media-thumb-internal.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-07-14 00:40:42 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2017-07-17 07:02:13 (GMT)
commit6339a446a14a52712bc3228a220ae6da9f2131e5 (patch)
tree92a8de66cb8d012563bf4024bb0203147d8a1f73 /src/media-thumb-internal.c
parent25b3a21bb456c0ac4f0011e2a4c33374cf38a52f (diff)
downloadlibmedia-thumbnail-6339a446a14a52712bc3228a220ae6da9f2131e5.zip
libmedia-thumbnail-6339a446a14a52712bc3228a220ae6da9f2131e5.tar.gz
libmedia-thumbnail-6339a446a14a52712bc3228a220ae6da9f2131e5.tar.bz2
[SATIZENVUL-956] change strncpy to g_strlcpyrefs/changes/97/138797/4
Change-Id: Id4108ba3e01f4d06f7fa6c235d9213fb804b3e40 Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/media-thumb-internal.c')
-rwxr-xr-xsrc/media-thumb-internal.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index f9e0991..65332c6 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -300,7 +300,7 @@ int _media_thumb_get_proper_thumb_size(int orig_w, int orig_h, int *thumb_w, int
return MS_MEDIA_ERR_NONE;
}
-int _media_thumb_get_exif_info(ExifData *ed, char *buf, int max_size, int *value, int ifdtype, long tagtype)
+int _media_thumb_get_exif_info(ExifData *ed, int *value, int ifdtype, long tagtype)
{
ExifEntry *entry;
ExifIfd ifd;
@@ -327,14 +327,6 @@ int _media_thumb_get_exif_info(ExifData *ed, char *buf, int max_size, int *value
ExifByteOrder mByteOrder = exif_data_get_byte_order(ed);
short exif_value = exif_get_short(entry->data, mByteOrder);
*value = (int)exif_value;
- } else {
- /* Get the contents of the tag in human-readable form */
- if (buf == NULL) {
- thumb_err("buf is NULL");
- return MS_MEDIA_ERR_INVALID_PARAMETER;
- }
- exif_entry_get_value(entry, buf, max_size);
- buf[strlen(buf)] = '\0';
}
}
@@ -866,7 +858,7 @@ int _media_thumb_jpeg(const char *origin_path, const char *thumb_path, int thumb
if (ed) {
/* First, Get orientation from exif */
- err = _media_thumb_get_exif_info(ed, NULL, 0, &orientation, EXIF_IFD_0, EXIF_TAG_ORIENTATION);
+ err = _media_thumb_get_exif_info(ed, &orientation, EXIF_IFD_0, EXIF_TAG_ORIENTATION);
if (err != MS_MEDIA_ERR_NONE) {
thumb_warn("_media_thumb_get_exif_info failed");
}
@@ -905,7 +897,7 @@ int _media_thumb_jpeg(const char *origin_path, const char *thumb_path, int thumb
} else {
ed = exif_data_new_from_file(origin_path);
if (ed) {
- err = _media_thumb_get_exif_info(ed, NULL, 0, &orientation, EXIF_IFD_0, EXIF_TAG_ORIENTATION);
+ err = _media_thumb_get_exif_info(ed, &orientation, EXIF_IFD_0, EXIF_TAG_ORIENTATION);
if (err != MS_MEDIA_ERR_NONE) {
thumb_warn("_media_thumb_get_exif_info failed");
}