ret = mm_util_create_color_image((mm_util_color_image_h *)&(handle->dst), (unsigned long)src_width, (unsigned long)src_height, src_format, (void *)dst_buf[dst_index], res_buffer_size);
if (ret != MM_UTIL_ERROR_NONE)
mm_util_error("mm_util_set_color_image failed");
+ } else {
+ mm_util_error("invalid result %p %zu", dst_buf[dst_index], res_buffer_size);
+ ret = MM_UTIL_ERROR_INVALID_OPERATION;
}
__mm_destroy_temp_buffer(dst_buf);
handle->dst = NULL;
ret = __mm_util_processing(handle);
- if (ret != MM_UTIL_ERROR_NONE) {
- mm_util_error("__mm_util_processing failed (%d)", ret);
- return ret;
- }
+ mm_util_retvm_if(ret != MM_UTIL_ERROR_NONE, ret, "__mm_util_processing failed [%d]", ret);
mm_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);