From 4e6c1819b0af7e33ac27d22fa02a09ad268f25b1 Mon Sep 17 00:00:00 2001 From: Jeff Shillitto Date: Sat, 16 May 2020 18:55:34 +1000 Subject: [PATCH 1/2] Set clip in constructor to resolve scale crop issue --- src/Clip.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Clip.cpp b/src/Clip.cpp index 39aad35d..cdb83cdc 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -150,6 +150,10 @@ Clip::Clip(ReaderBase* new_reader) : resampler(NULL), reader(new_reader), alloca // Update duration End(reader->info.duration); + + if (new_reader) { + new_reader->SetClip(this); + } } // Constructor with filepath From 5b5950c9913501bfe11feacac32e4a0bdc4ce568 Mon Sep 17 00:00:00 2001 From: Jeff Shillitto Date: Tue, 19 May 2020 19:57:06 +1000 Subject: [PATCH 2/2] use reader instead of new_reader --- src/Clip.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Clip.cpp b/src/Clip.cpp index cdb83cdc..fa1bb7c7 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -148,11 +148,10 @@ Clip::Clip(ReaderBase* new_reader) : resampler(NULL), reader(new_reader), alloca Open(); Close(); - // Update duration - End(reader->info.duration); - - if (new_reader) { - new_reader->SetClip(this); + // Update duration and set parent + if (reader) { + End(reader->info.duration); + reader->SetClip(this); } } @@ -206,9 +205,10 @@ Clip::Clip(std::string path) : resampler(NULL), reader(NULL), allocated_reader(N } } - // Update duration + // Update duration and set parent if (reader) { End(reader->info.duration); + reader->SetClip(this); allocated_reader = reader; init_reader_rotation(); }