From 0b16780a98230694551358746e7d987d4fc58e67 Mon Sep 17 00:00:00 2001 From: Naoto Kondo Date: Sat, 19 Mar 2022 10:24:47 +0900 Subject: [PATCH] use static cast --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8b991ce..9d38f4d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -117,7 +117,7 @@ PYBIND11_MODULE(NDIlib, m) { }, [](NDIlib_video_frame_v2_t &self, const py::array_t &array) { auto info = array.request(); - self.p_data = reinterpret_cast(info.ptr); + self.p_data = static_cast(info.ptr); self.picture_aspect_ratio = info.shape[1] / float(info.shape[0]); self.xres = info.shape[1]; self.yres = info.shape[0]; @@ -155,7 +155,7 @@ PYBIND11_MODULE(NDIlib, m) { "data", nullptr, [](NDIlib_audio_frame_v2_t &self, py::array_t &array) { auto info = array.request(); - self.p_data = reinterpret_cast(info.ptr); + self.p_data = static_cast(info.ptr); self.channel_stride_in_bytes = info.strides[0]; }) .def_readwrite("channel_stride_in_bytes", @@ -192,7 +192,7 @@ PYBIND11_MODULE(NDIlib, m) { "data", nullptr, [](NDIlib_audio_frame_v3_t &self, const py::array_t &array) { auto info = array.request(); - self.p_data = reinterpret_cast(info.ptr); + self.p_data = static_cast(info.ptr); self.channel_stride_in_bytes = info.strides[0]; }) .def_readwrite("channel_stride_in_bytes",