From f009b0f46c7c7b41e95a4934cc12f5d2b6a0bed0 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Tue, 22 Jan 2019 22:14:30 -0600 Subject: [PATCH] Fix default sizes on readers without MAX_WIDTH and MAX_HEIGHT settings (#188) --- src/FFmpegReader.cpp | 4 ++++ src/QtImageReader.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 547fbd99..f6c69a8a 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -892,7 +892,11 @@ void FFmpegReader::ProcessVideoPacket(int64_t requested_frame) // method will scale it back to timeline size before scaling it smaller again. This needs to be fixed in // the future. int max_width = Settings::Instance()->MAX_WIDTH; + if (max_width <= 0) + max_width = info.width; int max_height = Settings::Instance()->MAX_HEIGHT; + if (max_height <= 0) + max_height = info.height; Clip* parent = (Clip*) GetClip(); if (parent) { diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index 80a8237d..c500d221 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -168,7 +168,11 @@ std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) // method will scale it back to timeline size before scaling it smaller again. This needs to be fixed in // the future. int max_width = Settings::Instance()->MAX_WIDTH; + if (max_width <= 0) + max_width = info.width; int max_height = Settings::Instance()->MAX_HEIGHT; + if (max_height <= 0) + max_height = info.height; Clip* parent = (Clip*) GetClip(); if (parent) {