summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/capi-media-vision.spec2
-rw-r--r--test/testsuites/barcode/barcode_test_suite.c37
-rw-r--r--test/testsuites/image/image_test_suite.c1
-rw-r--r--test/testsuites/surveillance/surveillance_test_suite.c7
4 files changed, 36 insertions, 11 deletions
diff --git a/packaging/capi-media-vision.spec b/packaging/capi-media-vision.spec
index bac4c4f3..e19efbe0 100644
--- a/packaging/capi-media-vision.spec
+++ b/packaging/capi-media-vision.spec
@@ -1,7 +1,7 @@
Name: capi-media-vision
Summary: Media Vision library for Tizen Native API
Version: 0.3.24
-Release: 1
+Release: 2
Group: Multimedia/Framework
License: Apache-2.0 and BSD-2.0
Source0: %{name}-%{version}.tar.gz
diff --git a/test/testsuites/barcode/barcode_test_suite.c b/test/testsuites/barcode/barcode_test_suite.c
index d6ef9de3..b2a5f19f 100644
--- a/test/testsuites/barcode/barcode_test_suite.c
+++ b/test/testsuites/barcode/barcode_test_suite.c
@@ -666,6 +666,9 @@ int detect_barcode(barcode_model_s model, mv_rectangle_s roi)
if (MEDIA_VISION_ERROR_NONE != err) {
printf("ERROR: Errors were occurred during opening the file!!! code: %i\n", err);
+ if (data_buffer != NULL)
+ destroy_loaded_buffer(data_buffer);
+
MEDIA_VISION_FUNCTION_LEAVE();
return err;
@@ -677,6 +680,12 @@ int detect_barcode(barcode_model_s model, mv_rectangle_s roi)
if (MEDIA_VISION_ERROR_NONE != err) {
printf("ERROR: Can't convert to the selected colorspace!!! code: %i\n", err);
+ if (data_buffer != NULL)
+ destroy_loaded_buffer(data_buffer);
+
+ if (converted_buffer)
+ free(converted_buffer);
+
MEDIA_VISION_FUNCTION_LEAVE();
return err;
@@ -684,7 +693,7 @@ int detect_barcode(barcode_model_s model, mv_rectangle_s roi)
model.out_buffer_ptr = data_buffer;
- mv_engine_config_h mv_engine_config;
+ mv_engine_config_h mv_engine_config = NULL;
err = mv_create_engine_config(&mv_engine_config);
if (MEDIA_VISION_ERROR_NONE != err)
printf("ERROR: Errors were occurred during creating the media engine config: %i\n", err);
@@ -705,6 +714,15 @@ int detect_barcode(barcode_model_s model, mv_rectangle_s roi)
if (MEDIA_VISION_ERROR_NONE != err) {
printf("ERROR: Errors were occurred during creating the source!!! code: %i\n", err);
+ if (data_buffer != NULL)
+ destroy_loaded_buffer(data_buffer);
+
+ if (converted_buffer)
+ free(converted_buffer);
+
+ if (mv_engine_config)
+ mv_destroy_engine_config(mv_engine_config);
+
MEDIA_VISION_FUNCTION_LEAVE();
return err;
@@ -715,6 +733,16 @@ int detect_barcode(barcode_model_s model, mv_rectangle_s roi)
if (MEDIA_VISION_ERROR_NONE != err) {
printf("ERROR: Errors were occurred during filling the source!!! code: %i\n", err);
+ if (data_buffer != NULL)
+ destroy_loaded_buffer(data_buffer);
+
+ if (converted_buffer)
+ free(converted_buffer);
+
+ if (mv_engine_config)
+ mv_destroy_engine_config(mv_engine_config);
+
+ mv_destroy_source(source);
MEDIA_VISION_FUNCTION_LEAVE();
return err;
@@ -728,14 +756,9 @@ int detect_barcode(barcode_model_s model, mv_rectangle_s roi)
if (data_buffer != NULL)
destroy_loaded_buffer(data_buffer);
- if (MEDIA_VISION_ERROR_NONE != err) {
+ if (MEDIA_VISION_ERROR_NONE != err)
printf("ERROR: Errors were occurred during barcode detection!!! code: %i\n", err);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return err;
- }
-
err = mv_destroy_source(source);
if (MEDIA_VISION_ERROR_NONE != err)
printf("ERROR: Errors were occurred during destroying the source!!! code: %i\n", err);
diff --git a/test/testsuites/image/image_test_suite.c b/test/testsuites/image/image_test_suite.c
index 4b54e913..e7fbbf79 100644
--- a/test/testsuites/image/image_test_suite.c
+++ b/test/testsuites/image/image_test_suite.c
@@ -471,6 +471,7 @@ int recognize_image(const char *path_to_image,
printf("\nERROR: Errors were occurred during source destroying;"
"code %i\n", err2);
}
+ destroy_recognition_result(&result);
MEDIA_VISION_FUNCTION_LEAVE();
return err;
}
diff --git a/test/testsuites/surveillance/surveillance_test_suite.c b/test/testsuites/surveillance/surveillance_test_suite.c
index 6bf6fa2e..24721d4f 100644
--- a/test/testsuites/surveillance/surveillance_test_suite.c
+++ b/test/testsuites/surveillance/surveillance_test_suite.c
@@ -567,14 +567,15 @@ void push_source()
PRINT_R("Incorrect input! Try again.");
error = load_mv_source_from_file(path_to_image, source);
+
+ if (path_to_image != NULL)
+ free(path_to_image);
+
if (MEDIA_VISION_ERROR_NONE != error) {
PRINT_E("Errors were occurred during source loading, code %i", error);
return;
}
- if (path_to_image != NULL)
- free(path_to_image);
-
int video_stream_id = 0;
while (input_int("Input video stream identificator (integer value):",