Fix roi parameter handling 68/251568/2
authorKwang Son <k.son@samsung.com>
Fri, 15 Jan 2021 05:41:01 +0000 (14:41 +0900)
committerKwang Son <k.son@samsung.com>
Sun, 17 Jan 2021 22:45:43 +0000 (07:45 +0900)
roi for check_source_roi, check_source_roi_quadrangle is optional.

Change-Id: If23a99f5b0b51edfa456476cadacfa875b942194
Signed-off-by: Kwang Son <k.son@samsung.com>
mv_face/face/src/mv_face.c

index a92e387..0cad870 100644 (file)
@@ -39,8 +39,8 @@ static int check_source_roi_quadrangle(mv_quadrangle_s *roi, mv_source_h source)
        int ret;
        unsigned int src_w, src_h;
        if (roi == NULL) {
-               LOGE("roi is null");
-               return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+               LOGI("roi is null, so whole source will be used.");
+               return MEDIA_VISION_ERROR_NONE;
        }
        ret = mv_source_get_width(source, &src_w);
        if (ret != MEDIA_VISION_ERROR_NONE) {
@@ -67,8 +67,8 @@ static int check_source_roi(const mv_rectangle_s *roi, mv_source_h source)
        int ret;
        unsigned int src_w, src_h;
        if (roi == NULL) {
-               LOGE("roi is null");
-               return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+               LOGI("roi is null, so whole source will be used.");
+               return MEDIA_VISION_ERROR_NONE;
        }
        if (roi->width <= 0 || roi->height <= 0) {
                LOGE("roi width, height must be positive value");