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)
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;
}