diff --git a/modules/videoio/src/cap_mjpeg_decoder.cpp b/modules/videoio/src/cap_mjpeg_decoder.cpp index 77e5d2122..7abce2004 100644 --- a/modules/videoio/src/cap_mjpeg_decoder.cpp +++ b/modules/videoio/src/cap_mjpeg_decoder.cpp @@ -790,7 +790,7 @@ std::vector MotionJpegCapture::readFrame(frame_iterator it) result.reserve(chunk.m_size); result.resize(chunk.m_size); - m_file_stream.read(result.data(), chunk.m_size); + m_file_stream.read(&(result[0]), chunk.m_size); // result.data() failed with MSVS2008 return result; }