diff --git a/src/Clip.cpp b/src/Clip.cpp index d3f8a482..46f6b2ed 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -39,7 +39,7 @@ void Clip::init_settings() Position(0.0); Layer(0); Start(0.0); - End(0.0); + ClipBase::End(0.0); gravity = GRAVITY_CENTER; scale = SCALE_FIT; anchor = ANCHOR_CANVAS; @@ -147,7 +147,7 @@ Clip::Clip(ReaderBase* new_reader) : resampler(NULL), reader(new_reader), alloca // Update duration and set parent if (reader) { - End(reader->info.duration); + ClipBase::End(reader->info.duration); reader->ParentClip(this); // Init reader info struct init_reader_settings(); @@ -206,7 +206,7 @@ Clip::Clip(std::string path) : resampler(NULL), reader(NULL), allocated_reader(N // Update duration and set parent if (reader) { - End(reader->info.duration); + ClipBase::End(reader->info.duration); reader->ParentClip(this); allocated_reader = reader; // Init reader info struct @@ -302,7 +302,7 @@ void Clip::Open() // Set some clip properties from the file reader if (end == 0.0) - End(reader->info.duration); + ClipBase::End(reader->info.duration); } else // Throw error if reader not initialized @@ -346,6 +346,11 @@ float Clip::End() const return end; } +// Override End() position +void Clip::End(float value) { + ClipBase::End(value); +} + // Create an openshot::Frame object for a specific frame number of this reader. std::shared_ptr Clip::GetFrame(int64_t frame_number) { diff --git a/src/Clip.h b/src/Clip.h index c6dffbd2..49b3270a 100644 --- a/src/Clip.h +++ b/src/Clip.h @@ -260,9 +260,9 @@ namespace openshot { /// Get the current reader openshot::ReaderBase* Reader(); - // Override End() method - float End() const; ///< Get end position (in seconds) of clip (trim end of video), which can be affected by the time curve. - void End(float value) { end = value; } ///< Set end position (in seconds) of clip (trim end of video) + // Override End() position (in seconds) of clip (trim end of video) + float End() const override; ///< Get end position (in seconds) of clip (trim end of video), which can be affected by the time curve. + void End(float value) override; ///< Set end position (in seconds) of clip (trim end of video) // Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object