summaryrefslogtreecommitdiff
path: root/src/media-thumbnail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/media-thumbnail.c')
-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;
}