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

Export frame should use source resolution instead of project resolution

BUG: 419824
parent 56eac7f5
......@@ -227,8 +227,17 @@ QImage MonitorProxy::extractFrame(int frame_position, const QString &path, int w
if (!path.isEmpty()) {
QScopedPointer<Mlt::Producer> producer(new Mlt::Producer(pCore->getCurrentProfile()->profile(), path.toUtf8().constData()));
QScopedPointer<Mlt::Profile> tmpProfile(new Mlt::Profile());
QScopedPointer<Mlt::Producer> producer(new Mlt::Producer(*tmpProfile, path.toUtf8().constData()));
if (producer && producer->is_valid()) {
width = tmpProfile->width();
height = tmpProfile->height();
double projectFps = pCore->getCurrentFps();
double currentFps = tmpProfile->fps();
if (!qFuzzyCompare(projectFps, currentFps)) {
frame_position = frame_position * currentFps / projectFps;
QImage img = KThumb::getFrame(, frame_position, width, height);
return img;
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