ret = __mm_util_transform(handle);
- image_util_debug("result_image: %p [%zu] %lu X %lu (%u)", handle->dst->data, handle->dst->size, handle->dst->width, handle->dst->height, handle->dst->color);
+ if (handle->dst != NULL)
+ image_util_debug("result_image: %p [%zu] %lu X %lu (%u)", handle->dst->data, handle->dst->size, handle->dst->width, handle->dst->height, handle->dst->color);
+ else
+ image_util_error("Error - handle->dst is NULL");
if (ret == IMAGE_UTIL_ERROR_NONE)
image_util_debug("Success - transform");
image_util_fleave();
}
-int image_util_encode_create(image_util_type_e image_type, image_util_encode_h * handle)
+int image_util_encode_create(image_util_type_e image_type, image_util_encode_h *handle)
{
int err = IMAGE_UTIL_ERROR_NONE;
__allocate_source_buffer(_handle);
err = mm_util_gif_encode_create(&_handle->gif_encode_info.image_h);
- image_util_retvm_if((err != MM_UTIL_ERROR_NONE), _image_error_capi(err), "Error - mm_util_gif_encode_create is failed (%d)", err);
+ if (err != MM_UTIL_ERROR_NONE) {
+ image_util_error("Error - mm_util_gif_encode_create is failed (%d)", err);
+ image_util_encode_destroy(_handle);
+ return _image_error_capi(err);
+ }
}
*handle = (image_util_encode_h) _handle;
FILE *fpout = fopen(output_file, "w");
if (fpout) {
- media_packet_get_buffer_size(*packet, &size);
void *dst = NULL;
+ if(media_packet_get_buffer_size(*packet, &size) != MEDIA_PACKET_ERROR_NONE)
+ g_printf("Fail to media_packet_get_buffer_size \n");
+
if (media_packet_get_buffer_data_ptr(*packet, &dst) != MEDIA_PACKET_ERROR_NONE) {
IMAGE_UTIL_SAFE_FREE(dst);
IMAGE_UTIL_SAFE_FREE(output_fmt);