diff options
Diffstat (limited to 'src/media-thumbnail.c')
-rwxr-xr-x | src/media-thumbnail.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index fdce8b0..6246a23 100755 --- a/src/media-thumbnail.c +++ b/src/media-thumbnail.c @@ -358,8 +358,7 @@ int create_video_thumbnail_to_buffer(const char *path, size_t *thumb_size, unsigned int *thumb_width, unsigned int *thumb_height, - bool auto_rotate, - bool is_server_request) + bool auto_rotate) { int err = MS_MEDIA_ERR_NONE; int video_track_num = 0; @@ -369,7 +368,6 @@ int create_video_thumbnail_to_buffer(const char *path, size_t frame_size = 0; mm_util_image_h img = NULL; mm_util_rotate_type_e rot_type = MM_UTIL_ROTATE_NUM; - mm_util_image_h convert_img = NULL; err = __check_parameter_validity_for_buffer(path, width, height, thumb_buffer, thumb_size, thumb_width, thumb_height); thumb_retvm_if(err != MS_MEDIA_ERR_NONE, err, "Invalid parameter"); @@ -388,20 +386,8 @@ int create_video_thumbnail_to_buffer(const char *path, if (err != MS_MEDIA_ERR_NONE) return err; - if (is_server_request) { - err = mm_util_convert_B_B(img, MM_UTIL_COLOR_BGRA, &convert_img); - mm_image_destroy_image(img); - if (err != MM_UTIL_ERROR_NONE) { - thumb_err("mm_util_convert_B_B failed"); - return MS_MEDIA_ERR_INTERNAL; - } - - err = mm_image_get_image(convert_img, thumb_width, thumb_height, NULL, thumb_buffer, thumb_size); - mm_image_destroy_image(convert_img); - } else { - err = mm_image_get_image(img, thumb_width, thumb_height, NULL, thumb_buffer, thumb_size); - mm_image_destroy_image(img); - } + err = mm_image_get_image(img, thumb_width, thumb_height, NULL, thumb_buffer, thumb_size); + mm_image_destroy_image(img); return err; } |