}
-bool ClipItem::checkEffectsKeyframesPos(const int previous, const int current, bool fromStart)
+bool ClipItem::checkEffectsKeyframesPos(const int previous, const int current, bool fromStart, int renderWidth, int renderHeight)
{
bool effModified = false;
for (int i = 0; i < m_effectList.count(); i++) {
e.setAttribute("keyframes", newkfr);
}
} else if (e.attribute("type") == "geometry" && !e.hasAttribute("fixed")) {
- char *tmp = (char *) qstrdup(e.attribute("value").toUtf8().data());
- Mlt::Geometry geometry(tmp, cropDuration().frames(fps()));
- delete[] tmp;
+ Mlt::Geometry geometry(e.attribute("value").toUtf8().data(), cropDuration().frames(fps()), renderWidth, renderHeight);
Mlt::GeometryItem item;
while (!geometry.next_key(&item, cropDuration().frames(fps()))) {
* @param current New crop value
* @param fromStart true = crop from start, false = crop from end
* @return true if anything was modified */
- bool checkEffectsKeyframesPos(const int previous, const int current, bool fromStart);
+ bool checkEffectsKeyframesPos(const int previous, const int current, bool fromStart, int renderWidth = 0, int renderHeight = 0);
void insertKeyframe(QDomElement effect, int pos, int val);
void movedKeyframe(QDomElement effect, int oldpos, int newpos, double value);
void updateKeyframes(QDomElement effect);
indexes.append(panZoomPos);
}
- if (clip->checkEffectsKeyframesPos(oldInfo.cropStart.frames(m_document->fps()), clip->cropStart().frames(m_document->fps()), true)) {
+ if (clip->checkEffectsKeyframesPos(oldInfo.cropStart.frames(m_document->fps()), clip->cropStart().frames(m_document->fps()), true, m_document->width(), m_document->height())) {
// Keyframes were modified, updateClip
QDomNodeList effs = doc.elementsByTagName("effect");
// Hack: