use reader instead of new_reader

This commit is contained in:
Jeff Shillitto
2020-05-19 19:57:06 +10:00
parent 4e6c1819b0
commit 5b5950c991

View File

@@ -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();
}