diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/video-widget.cpp | 5 | ||||
-rw-r--r-- | video/video-widget.hpp | 2 |
2 files changed, 3 insertions, 4 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); diff --git a/video/video-widget.hpp b/video/video-widget.hpp index ab5d42d2..bb218c69 100644 --- a/video/video-widget.hpp +++ b/video/video-widget.hpp @@ -36,7 +36,7 @@ protected: std::vector<unsigned char> vec; bool fresh() const; void set_fresh(bool x); - void set_image(const unsigned char* src, int width, int height, unsigned stride, QImage::Format fmt); + void set_image(const unsigned char* src, int width, int height, int stride, QImage::Format fmt); private: void init_image_nolock(); |