Skip to content
Snippets Groups Projects
Commit ad091050 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 6c2aa4b1
No related branches found
No related tags found
No related merge requests found
......@@ -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 );
private:
QSharedPointer<Media> m_media;
QWeakPointer<Media> m_media;
std::unique_ptr<Backend::IInput> m_input;
QStringList m_metaTags;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment