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

Fix crash / thumbnail corruption for slideshows

parent 91638a2c
......@@ -391,13 +391,14 @@ Mlt::Producer *ProjectClip::thumbProducer()
}
Mlt::Producer prod = m_controller->originalProducer();
Clip clip(prod);
m_thumbsProducer = clip.softClone(ClipController::getPassPropertiesList());
// Check if we are using GPU accel, then we need to use alternate producer
if (KdenliveSettings::gpu_accel()) {
m_thumbsProducer = clip.softClone(ClipController::getPassPropertiesList());
Mlt::Filter scaler(*prod.profile(), "swscale");
Mlt::Filter converter(*prod.profile(), "avcolor_space");
m_thumbsProducer->attach(scaler);
m_thumbsProducer->attach(converter);
} else {
m_thumbsProducer = clip.clone();
}
return m_thumbsProducer;
}
......
......@@ -197,7 +197,6 @@ QImage KThumb::getFrame(Mlt::Frame *frame, int width, int height)
}
QImage image(ow, oh, QImage::Format_ARGB32_Premultiplied);
memcpy(image.bits(), imagedata, ow * oh * 4);
if (!image.isNull()) {
if (ow > (2 * width)) {
// there was a scaling problem, do it manually
......
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