From 2bfc2e4031d6c82c97c4e0b47a43cad2ba7e103e Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Tue, 12 Sep 2023 11:27:52 +0200 Subject: [PATCH 1/2] adjust graphicsview item's geometry from ui thread --- Source/GUI/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/GUI/player.cpp b/Source/GUI/player.cpp index f025a1204..f3c4c91ab 100644 --- a/Source/GUI/player.cpp +++ b/Source/GUI/player.cpp @@ -70,7 +70,7 @@ Player::Player(QWidget *parent) : #else if(m_w->videoSink()->videoFrame().size() != videoFrame.size()) { m_w->videoSink()->setVideoFrame(videoFrame); - updateVideoOutputSize(); + QTimer::singleShot(0, [this] { updateVideoOutputSize(); }); } else { m_w->videoSink()->setVideoFrame(videoFrame); } From e3b4175a4a0326a870739da6bfe9679e52d1067d Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Tue, 12 Sep 2023 11:28:20 +0200 Subject: [PATCH 2/2] don't crash on exiting from incomplete parsing --- Source/GUI/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/GUI/player.cpp b/Source/GUI/player.cpp index f3c4c91ab..1ed8fa784 100644 --- a/Source/GUI/player.cpp +++ b/Source/GUI/player.cpp @@ -642,7 +642,7 @@ void Player::updateInfoLabels() void Player::updateSlider(qint64 value) { - if(m_ignorePositionChanges) + if(m_ignorePositionChanges || !m_fileInformation) return; auto displayPosition = m_player->position();