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

Fix adjust to original size using proxy resolution

Fixes #1331
parent 68e0cb40
......@@ -636,6 +636,19 @@ const QSize ClipController::getFrameSize() const
if (m_masterProducer == nullptr) {
return QSize();
}
if (m_usesProxy) {
int width = m_masterProducer->get_int("kdenlive:original.meta.media.width");
int height = m_masterProducer->get_int("kdenlive:original.meta.media.height");
if (width == 0) {
width = m_masterProducer->get_int("kdenlive:original.width");
}
if (height == 0) {
width = m_masterProducer->get_int("kdenlive:original.height");
}
if (width > 0 && height > 0) {
return QSize(width, height);
}
}
int width = m_masterProducer->get_int("meta.media.width");
if (width == 0) {
width = m_masterProducer->get_int("width");
......
......@@ -442,10 +442,11 @@ int ClipModel::getIntProperty(const QString &name) const
QSize ClipModel::getFrameSize() const
{
READ_LOCK();
if (service()->parent().is_valid()) {
return QSize(service()->parent().get_int("meta.media.width"), service()->parent().get_int("meta.media.height"));
std::shared_ptr<ProjectClip> binClip = pCore->projectItemModel()->getClipByBinID(m_binClipId);
if (binClip) {
return binClip->getFrameSize();
}
return {service()->get_int("meta.media.width"), service()->get_int("meta.media.height")};
return QSize();
}
double ClipModel::getDoubleProperty(const QString &name) const
......
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