Commit 2180dfc3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Clip: Store Media as QWeakPointer

Having the Media holding a shared pointer to the clips and vice versa
has circular dependency written all over it.
parent b8dbba21
......@@ -43,7 +43,7 @@ Clip::Clip( QSharedPointer<Media> media, qint64 begin /*= 0*/, qint64 end /*= Ba
//FIXME: uuid -> QString conversion should be removed, since the helper stores the UUID as a QUuid
Workflow::Helper( uuid.toString() ),
m_media( media ),
m_input( std::move( m_media->input()->cut( begin, end ) ) ),
m_input( std::move( media->input()->cut( begin, end ) ) ),
m_isLinked( false )
Formats f;
......@@ -119,7 +119,7 @@ class Clip : public Workflow::Helper
void loadFilters(const QVariantMap& v );
QSharedPointer<Media> m_media;
QWeakPointer<Media> m_media;
std::unique_ptr<Backend::IInput> m_input;
QStringList m_metaTags;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment