summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_ht/video_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_ht/video_widget.cpp')
-rw-r--r--ftnoir_tracker_ht/video_widget.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/ftnoir_tracker_ht/video_widget.cpp b/ftnoir_tracker_ht/video_widget.cpp
index ac91dd6b..84cba6a3 100644
--- a/ftnoir_tracker_ht/video_widget.cpp
+++ b/ftnoir_tracker_ht/video_widget.cpp
@@ -13,7 +13,7 @@ using namespace std;
void VideoWidget::update_image(unsigned char *frame, int width, int height)
{
- QMutexLocker((QMutex*)&mtx);
+ QMutexLocker foo(&mtx);
QImage qframe = QImage(width, height, QImage::Format_RGB888);
uchar* data = qframe.bits();
const int pitch = qframe.bytesPerLine();
@@ -25,9 +25,6 @@ void VideoWidget::update_image(unsigned char *frame, int width, int height)
data[y * pitch + x * 3 + 1] = frame[pos + 1];
data[y * pitch + x * 3 + 2] = frame[pos + 0];
}
- if (qframe.size() == size() || (qframe.width() <= this->width() && qframe.height() <= this->height())) {
- }
- else
- qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation);
+ qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation);
pixmap = QPixmap::fromImage(qframe);
}