roi_tracker: move checking codes 14/282214/3
authorHyunsoo Park <hance.park@samsung.com>
Wed, 28 Sep 2022 09:39:38 +0000 (18:39 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Tue, 4 Oct 2022 05:18:17 +0000 (14:18 +0900)
[Version]: 0.23.32-0
[Issue type] : code clean up

Change-Id: I334d859ac84a239ac4c48816dd75240954d14ede
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
mv_roi_tracker/roi_tracker/src/mv_roi_tracker.c
packaging/capi-media-vision.spec

index 6b8b650..3977c04 100644 (file)
@@ -72,10 +72,11 @@ int mv_roi_tracker_prepare(mv_roi_tracker_h handle, int x, int y, int width, int
 {
        MEDIA_VISION_SUPPORT_CHECK(_mv_roi_tracking_check_system_info_feature_supported());
        MEDIA_VISION_INSTANCE_CHECK(handle);
-       MEDIA_VISION_NULL_ARG_CHECK(x);
-       MEDIA_VISION_NULL_ARG_CHECK(y);
-       MEDIA_VISION_NULL_ARG_CHECK(width);
-       MEDIA_VISION_NULL_ARG_CHECK(height);
+
+       if( x < 0 || y < 0 || width <= 0 || height <= 0 ) {
+               LOGE("Invalid ROI. Check if roi parameters are less than zero, specially if width and height are equal to zero.");
+               return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+       }
 
        MEDIA_VISION_FUNCTION_ENTER();
 
index 529d0a1..54de6e6 100644 (file)
@@ -1,6 +1,6 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.23.31
+Version:     0.23.32
 Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-3-Clause