Skip to content

Commit

Permalink
use reader instead of new_reader
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffski committed May 19, 2020
1 parent 4e6c181 commit 5b5950c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Clip.cpp
Expand Up @@ -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);
}
}

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

0 comments on commit 5b5950c

Please sign in to comment.