if (producer == NULL || producer->is_blank() || !producer->is_valid()) {
kDebug() << " / / / / / / / / ERROR / / / / // CANNOT LOAD PRODUCER: ";
- emit removeInvalidClip(clipId);
+ emit removeInvalidClip(clipId, replaceProducer);
delete producer;
return;
}
blockSignals(true);
char *tmp = decodedString(playlist);
m_mltProducer = new Mlt::Producer(*m_mltProfile, "westley-xml", tmp);
- delete[] tmp;
if (!m_mltProducer || !m_mltProducer->is_valid()) {
kDebug() << " WARNING - - - - -INVALID PLAYLIST: " << tmp;
+ m_mltProducer = m_blackClip->cut(0, 50);
}
+ delete[] tmp;
+
m_mltProducer->optimise();
/*if (KdenliveSettings::osdtimecode()) {
int ct = 0;
Mlt::Filter *filter = clipService.filter(ct);
while (filter) {
- if (filter->is_valid() && strcmp(filter->get("kdenlive_id"), "")) {
+ // Only duplicate Kdenlive filters, and skip the fade in effects
+ if (filter->is_valid() && strcmp(filter->get("kdenlive_id"), "") && strcmp(filter->get("kdenlive_id"), "fadein") && strcmp(filter->get("kdenlive_id"), "fade_from_black")) {
// looks like there is no easy way to duplicate a filter,
// so we will create a new one and duplicate its properties
Mlt::Filter *dup = new Mlt::Filter(*m_mltProfile, filter->get("mlt_service"));
Mlt::Tractor tractor(service);
- Mlt::Playlist playlist;// = new Mlt::Playlist();
+ Mlt::Playlist playlist;
int ct = tractor.count();
- // kDebug() << "// TRACK INSERT: " << ix << ", MAX: " << ct;
+ if (ix > ct) {
+ kDebug() << "// ERROR, TRYING TO insert TRACK " << ix << ", max: " << ct;
+ ix = ct;
+ }
+
int pos = ix;
if (pos < ct) {
Mlt::Producer *prodToMove = new Mlt::Producer(tractor.track(pos));