From: Wook Song Date: Wed, 29 Jan 2020 02:36:07 +0000 (+0900) Subject: [Filter/MvNCSDK] Revise error handling for unsupported API version X-Git-Tag: v1.3.0~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=221b3bbef7b43d00ec6b551bf1072cc06c68caa0;p=platform%2Fupstream%2Fnnstreamer.git [Filter/MvNCSDK] Revise error handling for unsupported API version This patch revises the error handling mechanism for the API version of MvNCSDK not supported by NNStreamer. Signed-off-by: Wook Song --- diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_movidius_ncsdk2.c b/ext/nnstreamer/tensor_filter/tensor_filter_movidius_ncsdk2.c index 79c3135..efe6416 100644 --- a/ext/nnstreamer/tensor_filter/tensor_filter_movidius_ncsdk2.c +++ b/ext/nnstreamer/tensor_filter/tensor_filter_movidius_ncsdk2.c @@ -117,11 +117,15 @@ _mvncsdk2_open (const GstTensorFilterProperties * prop, void **private_data) /* 0. Check the API version */ ret_code = ncGlobalGetOption (NC_RO_API_VERSION, sdk_ver, &size_sdk_ver); - if ((ret_code != NC_OK) && (sdk_ver[0] != NNS_MVNCSDK2_SUPPORT_API_MAJOR_VER)) { + if ((ret_code == NC_OK) && (sdk_ver[0] != NNS_MVNCSDK2_SUPPORT_API_MAJOR_VER)) { g_printerr ("The major version number of the MVNCSDK API should be %d, not %d\n", NNS_MVNCSDK2_SUPPORT_API_MAJOR_VER, sdk_ver[0]); return -1; + } else if (ret_code != NC_OK) { + g_printerr + ("Failed to get the information about the version of the MVNCSDK API\n"); + return -1; } /**