Fix splitting disabled clip losing clip state

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