Fix crash on project opening when bin clip contains effect

parent 173b98e8
......@@ -449,6 +449,10 @@ std::shared_ptr<Mlt::Producer> ProjectClip::thumbProducer()
m_thumbsProducer->attach(converter);
} else {
m_thumbsProducer = cloneProducer(pCore->thumbProfile());
Mlt::Filter scaler(*pCore->thumbProfile(), "swscale");
Mlt::Filter converter(*pCore->thumbProfile(), "avcolor_space");
m_thumbsProducer->attach(scaler);
m_thumbsProducer->attach(converter);
}
return m_thumbsProducer;
}
......
......@@ -365,13 +365,13 @@ ClipPropertiesController::ClipPropertiesController(ClipController *controller, Q
connect(pbox, &QCheckBox::stateChanged, [this, bg](int state) {
emit requestProxy(state == Qt::Checked);
bg->setEnabled(state == Qt::Checked);
setToolTip(m_properties.get("kdenlive:proxy"));
bg->setToolTip(m_properties.get("kdenlive:proxy"));
});
connect(this, &ClipPropertiesController::enableProxy, pbox, &QCheckBox::setEnabled);
connect(this, &ClipPropertiesController::proxyModified, [this, pbox, bg] (const QString &pxy) {
pbox->setChecked(pxy.length() > 2);
bg->setEnabled(pbox->isChecked());
setToolTip(pxy);
bg->setToolTip(pxy);
});
hlay->addWidget(pbox);
......
......@@ -57,8 +57,10 @@ QImage ThumbnailProvider::requestImage(const QString &id, QSize *size, const QSi
std::shared_ptr<ProjectClip> binClip = pCore->projectItemModel()->getClipByBinID(binId);
if (binClip) {
std::shared_ptr<Mlt::Producer> prod = binClip->thumbProducer();
result = makeThumbnail(prod, frameNumber, requestedSize);
ThumbnailCache::get()->storeThumbnail(binId, frameNumber, result, false);
if (prod && prod->is_valid()) {
result = makeThumbnail(prod, frameNumber, requestedSize);
ThumbnailCache::get()->storeThumbnail(binId, frameNumber, result, false);
}
}
/*if (m_producers.contains(binId.toInt())) {
......
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