summaryrefslogtreecommitdiff
path: root/src/media-thumb-internal.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-06-07 15:46:18 +0900
committerMinje Ahn <minje.ahn@samsung.com>2017-06-08 14:08:18 +0900
commit75c4bd5f2433f484a974b913d9e58cf5f5cdb187 (patch)
treef540a33e9b4d0e47f670ae93a51fa9890fdc9598 /src/media-thumb-internal.c
parent34ed08a8f899bffe2f9b27b4bd2e6e180650e61c (diff)
downloadlibmedia-thumbnail-75c4bd5f2433f484a974b913d9e58cf5f5cdb187.tar.gz
libmedia-thumbnail-75c4bd5f2433f484a974b913d9e58cf5f5cdb187.tar.bz2
libmedia-thumbnail-75c4bd5f2433f484a974b913d9e58cf5f5cdb187.zip
Code cleanup
Remove format enum and related API Remove unused codes Merge same logics Change-Id: I1e44585955eb1698d2aa5901f2e1969d831de6c7 Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/media-thumb-internal.c')
-rwxr-xr-xsrc/media-thumb-internal.c355
1 files changed, 31 insertions, 324 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index ecd7d8e..540ea0b 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -46,8 +46,6 @@
#include <sys/stat.h>
#define MEDIA_THUMB_ROUND_UP_8(num) (((num)+7)&~7)
-/* performance enhanced to make thumbnail */
-#define THUMB_PERFORMANCE_ENHANCED 1
int _media_thumb_resize_data(unsigned char *src_data,
int src_width,
@@ -57,20 +55,16 @@ int _media_thumb_resize_data(unsigned char *src_data,
int dst_width,
int dst_height);
-#if THUMB_PERFORMANCE_ENHANCED
int _media_thumb_convert_video(const unsigned char *src_data, const int src_size,
unsigned char **dst_data,
unsigned int *buf_size,
int width,
- int height,
- mm_util_img_format src_format,
- mm_util_img_format dst_format)
+ int height)
{
int err = MS_MEDIA_ERR_NONE;
+ int i = 0, j;
- thumb_dbg("src format:%d, dst format:%d", src_format, dst_format);
-
- if (mm_util_get_image_size(dst_format, width, height, buf_size) < 0) {
+ if (mm_util_get_image_size(MM_UTIL_IMG_FMT_BGRA8888, width, height, buf_size) < 0) {
thumb_err("mm_util_get_image_size failed");
return MS_MEDIA_ERR_INTERNAL;
}
@@ -78,36 +72,16 @@ int _media_thumb_convert_video(const unsigned char *src_data, const int src_size
thumb_dbg("mm_util_get_image_size : %d", *buf_size);
*dst_data = (unsigned char *)malloc(*buf_size);
-
if (*dst_data == NULL) {
thumb_err("Failed to allocate memory");
return MS_MEDIA_ERR_OUT_OF_MEMORY;
}
- if (src_format == MM_UTIL_IMG_FMT_RGB888 &&
- dst_format == MM_UTIL_IMG_FMT_BGRA8888) {
-
- int i = 0, j;
- for (j = 0; ((j < src_size) && (i < *buf_size)); j += 3) {
- (*dst_data)[i++] = (src_data[j + 2]);
- (*dst_data)[i++] = (src_data[j + 1]);
- (*dst_data)[i++] = (src_data[j]);
- (*dst_data)[i++] = 0x0;
- }
-
- } else {
- err = mm_util_convert_colorspace(src_data,
- width,
- height,
- src_format,
- *dst_data,
- dst_format);
-
- if (err < 0) {
- thumb_err("Failed to change from rgb888 to argb8888 %d", err);
- SAFE_FREE(*dst_data);
- return MS_MEDIA_ERR_INTERNAL;
- }
+ for (j = 0; ((j < src_size) && (i < *buf_size)); j += 3) {
+ (*dst_data)[i++] = (src_data[j + 2]);
+ (*dst_data)[i++] = (src_data[j + 1]);
+ (*dst_data)[i++] = (src_data[j]);
+ (*dst_data)[i++] = 0x0;
}
thumb_dbg("_media_thumb_convert_video success");
@@ -305,7 +279,6 @@ int _media_thumb_rotate_thumb(unsigned char *data, int size, int *width, int *he
thumb_dbg("_media_thumb_rotate_thumb success");
return MS_MEDIA_ERR_NONE;
}
-#endif
int _media_thumb_get_proper_thumb_size(int orig_w, int orig_h,
int *thumb_w, int *thumb_h)
@@ -549,7 +522,6 @@ int _media_thumb_get_thumb_from_exif(ExifData *ed,
thumb_width = decoded.width;
thumb_height = decoded.height;
-#if THUMB_PERFORMANCE_ENHANCED
int rot_type = MM_UTIL_ROTATE_0;
if (orientation == ROT_90) {
rot_type = MM_UTIL_ROTATE_90;
@@ -569,65 +541,6 @@ int _media_thumb_get_thumb_from_exif(ExifData *ed,
thumb_info->size = decoded.size;
thumb_info->width = decoded.width;
thumb_info->height = decoded.height;
-#else
- /* Start to decode to rotate */
- unsigned char *rotated = NULL;
- unsigned int r_w = decoded.height;
- unsigned int r_h = decoded.width;
- unsigned int r_size = 0;
- mm_util_img_rotate_type rot_type = MM_UTIL_ROTATE_0;
-
- int i, rotate_cnt = 0;
-
- rot_type = MM_UTIL_ROTATE_90;
- if (orientation == ROT_90) {
- rotate_cnt = 1;
- } else if (orientation == ROT_180) {
- rotate_cnt = 2;
- } else if (orientation == ROT_270) {
- rotate_cnt = 3;
- }
-
- for (i = 0; i < rotate_cnt; i++) {
- if (i == 1) {
- r_w = decoded.width;
- r_h = decoded.height;
- }
-
- err = mm_util_get_image_size(MM_UTIL_IMG_FMT_RGB888, r_w, r_h, &r_size);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("mm_util_get_image_size failed : %d", err);
- SAFE_FREE(decoded.data);
- return err;
- }
-
- rotated = (unsigned char *)malloc(r_size);
- err = mm_util_rotate_image(decoded.data, decoded.width, decoded.height,
- MM_UTIL_IMG_FMT_RGB888,
- rotated, &r_w, &r_h,
- rot_type);
-
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("mm_util_rotate_image failed : %d", err);
- SAFE_FREE(decoded.data);
- SAFE_FREE(rotated);
- return err;
- } else {
- thumb_err("mm_util_rotate_image succeed");
- }
-
- SAFE_FREE(decoded.data);
- decoded.data = rotated;
- decoded.width = r_w;
- decoded.height = r_h;
- }
-
- //thumb_dbg("Width : %d, Height : %d", r_w, r_h);
- thumb_info->data = rotated;
- thumb_info->size = r_size;
- thumb_info->width = r_w;
- thumb_info->height = r_h;
-#endif
} else {
/*in this case, just write raw data in file */
thumb_dbg_slog("Thumb is :%s", thumb_path);
@@ -890,32 +803,15 @@ int _media_thumb_decode_with_evas(const char *origin_path,
return err;
}
-mm_util_img_format _media_thumb_get_format(media_thumb_format src_format)
-{
- switch (src_format) {
- case MEDIA_THUMB_BGRA:
- return MM_UTIL_IMG_FMT_BGRA8888;
- case MEDIA_THUMB_RGB888:
- return MM_UTIL_IMG_FMT_RGB888;
- default:
- return MS_MEDIA_ERR_INVALID_PARAMETER;
- }
-}
-
-int _media_thumb_convert_data(media_thumb_info *thumb_info,
- int thumb_width,
- int thumb_height,
- mm_util_img_format src_format,
- mm_util_img_format dst_format)
+int _media_thumb_convert_data(media_thumb_info *thumb_info, int thumb_width, int thumb_height)
{
int err = MS_MEDIA_ERR_NONE;
unsigned int buf_size = 0;
unsigned char *src_data = thumb_info->data;
unsigned char *dst_data = NULL;
+ int i = 0, j;
- thumb_dbg("src format:%d, dst format:%d", src_format, dst_format);
-
- if (mm_util_get_image_size(dst_format, thumb_width, thumb_height, &buf_size) < 0) {
+ if (mm_util_get_image_size(MM_UTIL_IMG_FMT_BGRA8888, thumb_width, thumb_height, &buf_size) < 0) {
thumb_err("mm_util_get_image_size failed");
return MS_MEDIA_ERR_INTERNAL;
}
@@ -923,37 +819,16 @@ int _media_thumb_convert_data(media_thumb_info *thumb_info,
thumb_dbg("mm_util_get_image_size : %d", buf_size);
dst_data = (unsigned char *)malloc(buf_size);
-
if (dst_data == NULL) {
thumb_err("Failed to allocate memory");
return MS_MEDIA_ERR_OUT_OF_MEMORY;
}
- if (src_format == MM_UTIL_IMG_FMT_RGB888 &&
- dst_format == MM_UTIL_IMG_FMT_BGRA8888) {
-
- int i = 0, j;
- for (j = 0; j < thumb_width * 3 * thumb_height;
- j += 3) {
- dst_data[i++] = (src_data[j + 2]);
- dst_data[i++] = (src_data[j + 1]);
- dst_data[i++] = (src_data[j]);
- dst_data[i++] = 0x0;
- }
-
- } else {
- err = mm_util_convert_colorspace(src_data,
- thumb_width,
- thumb_height,
- src_format,
- dst_data,
- dst_format);
-
- if (err < 0) {
- thumb_err("Failed to change from rgb888 to argb8888 %d", err);
- SAFE_FREE(dst_data);
- return MS_MEDIA_ERR_INTERNAL;
- }
+ for (j = 0; j < thumb_width * 3 * thumb_height; j += 3) {
+ dst_data[i++] = (src_data[j + 2]);
+ dst_data[i++] = (src_data[j + 1]);
+ dst_data[i++] = (src_data[j]);
+ dst_data[i++] = 0x0;
}
SAFE_FREE(thumb_info->data);
@@ -965,48 +840,11 @@ int _media_thumb_convert_data(media_thumb_info *thumb_info,
return err;
}
-int _media_thumb_convert_format(media_thumb_info *thumb_info,
- media_thumb_format src_format,
- media_thumb_format dst_format)
-{
- int err = MS_MEDIA_ERR_NONE;
-
- if (src_format == dst_format) {
- //thumb_dbg("src_format == dst_format");
- return err;
- }
-
- mm_util_img_format src_mm_format;
- mm_util_img_format dst_mm_format;
-
- src_mm_format = _media_thumb_get_format(src_format);
- dst_mm_format = _media_thumb_get_format(dst_format);
-
- if ((int)src_mm_format == -1 || (int)dst_mm_format == -1) {
- thumb_err("Format is invalid");
- return MS_MEDIA_ERR_INVALID_PARAMETER;
- }
-
- err = _media_thumb_convert_data(thumb_info,
- thumb_info->width,
- thumb_info->height,
- src_mm_format,
- dst_mm_format);
-
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("media_thumb_convert_format failed : %d", err);
- return err;
- }
-
- return err;
-}
-
int _media_thumb_agif(const char *origin_path,
int image_width,
int image_height,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
@@ -1042,9 +880,9 @@ int _media_thumb_agif(const char *origin_path,
SAFE_FREE(thumb);
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
+ err = _media_thumb_convert_data(thumb_info, thumb_info->width, thumb_info->height);
if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
+ thumb_err("_media_thumb_convert_data falied: %d", err);
SAFE_FREE(thumb_info->data);
return err;
}
@@ -1055,96 +893,64 @@ int _media_thumb_agif(const char *origin_path,
int _media_thumb_png(const char *origin_path,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
- err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
+ err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("decode_with_evas failed : %d", err);
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
-
return err;
}
int _media_thumb_bmp(const char *origin_path,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
- err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
+ err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("decode_with_evas failed : %d", err);
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
-
return err;
}
int _media_thumb_wbmp(const char *origin_path,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
- err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
+ err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("decode_with_evas failed : %d", err);
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
-
return err;
}
int _media_thumb_gif(const char *origin_path,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
- err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
+ err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, NORMAL);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("decode_with_evas failed : %d", err);
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
-
return err;
}
@@ -1152,7 +958,6 @@ int _media_thumb_jpeg(const char *origin_path,
const char *thumb_path,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
@@ -1167,14 +972,12 @@ int _media_thumb_jpeg(const char *origin_path,
if (ed) {
/* First, Get orientation from exif */
err = _media_thumb_get_exif_info(ed, NULL, 0, &orientation, EXIF_IFD_0, EXIF_TAG_ORIENTATION);
-
if (err != MS_MEDIA_ERR_NONE) {
thumb_warn("_media_thumb_get_exif_info failed");
}
/* Second, Get thumb from exif */
err = _media_thumb_get_thumb_from_exif(ed, origin_path, thumb_path, orientation, thumb_width, thumb_height, thumb_info);
-
if (err != MS_MEDIA_ERR_NONE) {
thumb_dbg("_media_thumb_get_thumb_from_exif failed");
} else {
@@ -1193,14 +996,7 @@ int _media_thumb_jpeg(const char *origin_path,
}
if (thumb_info->is_saved == FALSE) {
- mm_util_img_format dst_format = _media_thumb_get_format(format);
-
- err = _media_thumb_convert_data(thumb_info,
- thumb_info->width,
- thumb_info->height,
- MM_UTIL_IMG_FMT_RGB888,
- dst_format);
-
+ err = _media_thumb_convert_data(thumb_info, thumb_info->width, thumb_info->height);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("_media_thumb_convert_data failed : %d", err);
exif_data_unref(ed);
@@ -1224,18 +1020,10 @@ int _media_thumb_jpeg(const char *origin_path,
if (!thumb_done) {
err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, orientation);
-
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("decode_with_evas failed : %d", err);
return err;
}
-
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
}
return err;
@@ -1245,7 +1033,6 @@ int _media_thumb_image(const char *origin_path,
const char *thumb_path,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
@@ -1269,15 +1056,15 @@ int _media_thumb_image(const char *origin_path,
}
if (image_type == IMG_CODEC_AGIF) {
- err = _media_thumb_agif(origin_path, origin_w, origin_h, thumb_width, thumb_height, format, thumb_info);
+ err = _media_thumb_agif(origin_path, origin_w, origin_h, thumb_width, thumb_height, thumb_info);
} else if (image_type == IMG_CODEC_JPEG) {
- err = _media_thumb_jpeg(origin_path, thumb_path, thumb_width, thumb_height, format, thumb_info);
+ err = _media_thumb_jpeg(origin_path, thumb_path, thumb_width, thumb_height, thumb_info);
} else if (image_type == IMG_CODEC_PNG) {
- err = _media_thumb_png(origin_path, thumb_width, thumb_height, format, thumb_info);
+ err = _media_thumb_png(origin_path, thumb_width, thumb_height, thumb_info);
} else if (image_type == IMG_CODEC_GIF) {
- err = _media_thumb_gif(origin_path, thumb_width, thumb_height, format, thumb_info);
+ err = _media_thumb_gif(origin_path, thumb_width, thumb_height, thumb_info);
} else if (image_type == IMG_CODEC_BMP) {
- err = _media_thumb_bmp(origin_path, thumb_width, thumb_height, format, thumb_info);
+ err = _media_thumb_bmp(origin_path, thumb_width, thumb_height, thumb_info);
} else {
char file_ext[10];
err = _media_thumb_get_file_ext(origin_path, file_ext, sizeof(file_ext));
@@ -1303,7 +1090,7 @@ int _media_thumb_image(const char *origin_path,
thumb_info->origin_width = wbmp_width;
thumb_info->origin_height = wbmp_height;
- err = _media_thumb_wbmp(origin_path, thumb_width, thumb_height, format, thumb_info);
+ err = _media_thumb_wbmp(origin_path, thumb_width, thumb_height, thumb_info);
return err;
}
@@ -1319,7 +1106,6 @@ int _media_thumb_image(const char *origin_path,
int _media_thumb_video(const char *origin_path,
int thumb_width,
int thumb_height,
- media_thumb_format format,
media_thumb_info *thumb_info)
{
int err = MS_MEDIA_ERR_NONE;
@@ -1404,7 +1190,6 @@ int _media_thumb_video(const char *origin_path,
/* MMF api handle both normal and DRM video */
if (video_track_num > 0 || is_drm) {
-
err = mm_file_get_attrs(content, &err_msg,
MM_FILE_CONTENT_VIDEO_WIDTH,
&width,
@@ -1436,10 +1221,10 @@ int _media_thumb_video(const char *origin_path,
thumb_info->origin_height = height;
err = _media_thumb_get_proper_thumb_size(width, height, &thumb_width, &thumb_height);
-#if THUMB_PERFORMANCE_ENHANCED
+
unsigned int new_size = 0;
unsigned char *new_frame = NULL;
- err = _media_thumb_convert_video(frame, size, &new_frame, &new_size, width, height, MM_UTIL_IMG_FMT_RGB888, MM_UTIL_IMG_FMT_BGRA8888);
+ err = _media_thumb_convert_video(frame, size, &new_frame, &new_size, width, height);
if ((err != MS_MEDIA_ERR_NONE) || (new_frame == NULL)) {
thumb_err("_media_thumb_convert_video falied: %d", err);
mm_file_destroy_content_attrs(content);
@@ -1478,84 +1263,6 @@ int _media_thumb_video(const char *origin_path,
return err;
}
}
-#else
- if (width > thumb_width || height > thumb_height) {
- err = _media_thumb_resize_data(frame,
- width,
- height,
- MM_UTIL_IMG_FMT_RGB888,
- thumb_info,
- thumb_width,
- thumb_height);
-
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_resize_data failed - %d", err);
- SAFE_FREE(thumb_info->data);
- mm_file_destroy_content_attrs(content);
- return err;
- }
- } else {
- thumb_info->size = size;
- thumb_info->width = width;
- thumb_info->height = height;
- thumb_info->data = malloc(size);
- if (thumb_info->data == NULL) {
- thumb_err("memory allcation failed");
- mm_file_destroy_content_attrs(content);
- return MS_MEDIA_ERR_OUT_OF_MEMORY;
- }
- memcpy(thumb_info->data, frame, size);
- }
-
- mm_file_destroy_content_attrs(content);
- if (rot_type == MM_UTIL_ROTATE_90 || rot_type == MM_UTIL_ROTATE_180 || rot_type == MM_UTIL_ROTATE_270) {
- /* Start to decode to rotate */
- unsigned char *rotated = NULL;
- unsigned int r_w = thumb_info->height;
- unsigned int r_h = thumb_info->width;
- unsigned int r_size = 0;
-
- if (rot_type == MM_UTIL_ROTATE_180) {
- r_w = thumb_info->width;
- r_h = thumb_info->height;
- }
-
- err = mm_util_get_image_size(MM_UTIL_IMG_FMT_RGB888, r_w, r_h, &r_size);
- if (err != FILEINFO_ERROR_NONE) {
- thumb_err("mm_util_get_image_size failed : %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
-
- //thumb_dbg("Size of Rotated : %d", r_size);
- rotated = (unsigned char *)malloc(r_size);
- err = mm_util_rotate_image(thumb_info->data, thumb_info->width, thumb_info->height,
- MM_UTIL_IMG_FMT_RGB888,
- rotated, &r_w, &r_h,
- rot_type);
-
- if (err != FILEINFO_ERROR_NONE) {
- thumb_err("mm_util_rotate_image failed : %d", err);
- SAFE_FREE(thumb_info->data);
- SAFE_FREE(rotated);
- return err;
- } else {
- thumb_dbg("mm_util_rotate_image succeed");
- }
-
- SAFE_FREE(thumb_info->data);
- thumb_info->data = rotated;
- thumb_info->size = r_size;
- thumb_info->width = r_w;
- thumb_info->height = r_h;
- }
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
-#endif
} else {
thumb_dbg("no contents information");
frame = NULL;