summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKwanghoon Son <k.son@samsung.com>2023-11-02 14:55:35 +0900
committerKwanghoon Son <k.son@samsung.com>2023-11-02 15:01:44 +0900
commit2e00bae635ae920f3470b46464607ec1fb4de972 (patch)
tree6046d172f6854e86a2d9f220f51d7e0063ef0ea6
parent1e73a39953db71878bf87b92f7c469aa2d095247 (diff)
downloadvision-source-v4l2-accepted/tizen_8.0_unified.tar.gz
vision-source-v4l2-accepted/tizen_8.0_unified.tar.bz2
vision-source-v4l2-accepted/tizen_8.0_unified.zip
[Version] 1.0.1 Change-Id: I63d1f9b785c62705409f66993b99ab87fe1804a1 Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rwxr-xr-xexecute_format.sh1
-rw-r--r--packaging/vision-source-v4l2.spec2
-rw-r--r--src/vision_source_v4l2.cpp3
3 files changed, 4 insertions, 2 deletions
diff --git a/execute_format.sh b/execute_format.sh
new file mode 100755
index 0000000..bd0fd4b
--- /dev/null
+++ b/execute_format.sh
@@ -0,0 +1 @@
+find . -iname *.h -o -iname *.hpp -o -iname *.cpp -o -iname *.c | xargs clang-format-9 -i \ No newline at end of file
diff --git a/packaging/vision-source-v4l2.spec b/packaging/vision-source-v4l2.spec
index 2ecbb7a..702e777 100644
--- a/packaging/vision-source-v4l2.spec
+++ b/packaging/vision-source-v4l2.spec
@@ -3,7 +3,7 @@
Name: vision-source-v4l2
Summary: vision source-v4l2
-Version: 1.0.0
+Version: 1.0.1
Release: 0
Group: Multimedia/Framework
License: Apache-2.0
diff --git a/src/vision_source_v4l2.cpp b/src/vision_source_v4l2.cpp
index 606f4a0..9d7e075 100644
--- a/src/vision_source_v4l2.cpp
+++ b/src/vision_source_v4l2.cpp
@@ -410,6 +410,7 @@ static int __vision_source_list_devices(vision_source_v4l2_s *vs_handle)
for (size_t i = 0; i < dev_count; i++) {
vs_handle->dev_info[i].index = i;
strncpy(vs_handle->dev_info[i].name, dev_name[i].c_str(), DEVICE_NAME_LENGTH_MAX);
+ vs_handle->dev_info[i].name[DEVICE_NAME_LENGTH_MAX - 1] = '\0';
vs_handle->fmt[i] = (media_format_h *) calloc(dev_fmt_list[i].size(), sizeof(media_format_h));
if (!vs_handle->fmt[i]) {
return VISION_SOURCE_ERROR_OUT_OF_MEMORY;
@@ -656,7 +657,7 @@ int vision_source_init(vision_source_h *handle)
int ret = __vision_source_list_devices(v4l2_handle);
if (ret != VISION_SOURCE_ERROR_NONE) {
- free(v4l2_handle);
+ delete v4l2_handle;
LOGE("get device info failed");
return ret;
}