Commit b6699115 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix splitting disabled clip losing clip state

CCBUG: 363247
parent 3973177a
......@@ -279,6 +279,7 @@ bool Track::cut(qreal t)
QScopedPointer<Mlt::Producer> clip1(m_playlist.get_clip(index + 1));
QScopedPointer<Mlt::Producer> clip2(m_playlist.get_clip(index));
qDebug()<<"CLIP CUT ID: "<<clip1->get("id")<<" / "<<clip1->parent().get("id");
Clip (*clip1).addEffects(*clip2, true);
// adjust filters in/out
Clip (*clip2).adjustEffectsLength();
......@@ -421,6 +422,8 @@ bool Track::replace(qreal t, Mlt::Producer *prod, PlaylistState::ClipState state
QString service = prod->get("mlt_service");
if (state == PlaylistState::Disabled) {
QScopedPointer<Mlt::Producer> prodCopy(Clip(*prod).clone());
// Reset id to let MLT give a new one
prodCopy->set("id", (char*)NULL);
prodCopy->set("video_index", -1);
prodCopy->set("audio_index", -1);
prodCopy->set("kdenlive:binid", prod->get("id"));
Supports Markdown
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