summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhj kim <backto.kim@samsung.com>2020-03-17 10:56:02 +0900
committerhj kim <backto.kim@samsung.com>2020-03-17 10:59:31 +0900
commit854f67afeb90b6610fc84e682fd72774b4ca37d2 (patch)
tree023080f19c26281c490a863aa48e84d43c3e4d70 /src
parent0c6efd9728efa22bb69b5b6a31ea05bea1e129d2 (diff)
downloadlibmedia-thumbnail-854f67afeb90b6610fc84e682fd72774b4ca37d2.tar.gz
libmedia-thumbnail-854f67afeb90b6610fc84e682fd72774b4ca37d2.tar.bz2
libmedia-thumbnail-854f67afeb90b6610fc84e682fd72774b4ca37d2.zip
Change-Id: Iff3a0406cd65e598f58050a41bc20eedbba30496
Diffstat (limited to 'src')
-rwxr-xr-xsrc/media-thumbnail.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index 8fe3eb2..2b986de 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -437,7 +437,10 @@ int create_video_thumbnail_to_file(const char *path, unsigned int width, unsigne
rot_type = MM_UTIL_ROTATE_0;
//Extract thumbnail
- return __get_video_thumb_to_file(video_width, video_height, frame, frame_size, rot_type, thumb_path, width, height);
+ err = __get_video_thumb_to_file(video_width, video_height, frame, frame_size, rot_type, thumb_path, width, height);
+ g_free(frame);
+
+ return err;
}
int create_video_thumbnail_to_buffer(const char *path, unsigned int width, unsigned int height, unsigned char **thumb_buffer, size_t *thumb_size, unsigned int *thumb_width, unsigned int *thumb_height, bool auto_rotate)
@@ -468,6 +471,7 @@ int create_video_thumbnail_to_buffer(const char *path, unsigned int width, unsig
err = mm_image_get_image(img, thumb_width, thumb_height, NULL, thumb_buffer, thumb_size);
mm_image_destroy_image(img);
+ g_free(frame);
return err;
}