summaryrefslogtreecommitdiffhomepage
path: root/video/video-widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video/video-widget.cpp')
-rw-r--r--video/video-widget.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/video/video-widget.cpp b/video/video-widget.cpp
index 4394fec7..9100e0ea 100644
--- a/video/video-widget.cpp
+++ b/video/video-widget.cpp
@@ -33,13 +33,12 @@ void video_widget::update_image(const QImage& img)
set_fresh(true);
}
-void video_widget::set_image(const unsigned char* src, int width, int height,
- unsigned stride, QImage::Format fmt)
+void video_widget::set_image(const unsigned char* src, int width, int height, int stride, QImage::Format fmt)
{
QMutexLocker l(&mtx);
texture = QImage();
- unsigned nbytes = stride * height;
+ unsigned nbytes = (unsigned)(stride * height);
vec.resize(nbytes); vec.shrink_to_fit();
std::memcpy(vec.data(), src, nbytes);
texture = QImage((const unsigned char*)vec.data(), width, height, stride, fmt);