You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge pull request #513 from jeffski/set-constructor-clip
Set clip in constructor to resolve scale crop issue
This commit is contained in:
10
src/Clip.cpp
10
src/Clip.cpp
@@ -148,8 +148,11 @@ Clip::Clip(ReaderBase* new_reader) : resampler(NULL), reader(new_reader), alloca
|
||||
Open();
|
||||
Close();
|
||||
|
||||
// Update duration
|
||||
End(reader->info.duration);
|
||||
// Update duration and set parent
|
||||
if (reader) {
|
||||
End(reader->info.duration);
|
||||
reader->SetClip(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Constructor with filepath
|
||||
@@ -202,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user