aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2016-04-25 22:40:56 +0200
committerJean-Baptiste Mardelle <[email protected]>2016-04-25 22:40:56 +0200
commit1526861788a805797952a9e859f4dcd721f0ab12 (patch)
treea6cec7424543ff3ed5b8f75f7a01ccf572758033
parent87c1486eacbdf9936415e899f11ad831ffb5e59f (diff)
Fix Extract corruption found by thediveo
Ref: T1961
-rw-r--r--src/timeline/customtrackview.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index 9cf5c80..1176c3d 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -3209,7 +3209,10 @@ void CustomTrackView::extractZone(bool closeGap)
}
ItemInfo moveInfo = item->info();
if (item->type() == AVWidget) {
- if (moveInfo.startPos < outPoint && moveInfo.endPos > outPoint) {
+ if (moveInfo.startPos < outPoint) {
+ if (moveInfo.endPos <= outPoint) {
+ continue;
+ }
moveInfo.startPos = outPoint;
moveInfo.cropDuration = moveInfo.endPos - moveInfo.startPos;
}
@@ -8196,18 +8199,6 @@ void CustomTrackView::dropTransitionGeometry(Transition *trans, const QString &g
trans->setSelected(true);
updateTimelineSelection();
}
- /*ItemInfo info = trans->info();
- QPoint p;
- ClipItem *transitionClip = getClipItemAtStart(info.startPos, info.track);
- if (transitionClip && transitionClip->binClip()) {
- int frameWidth = transitionClip->binClip()->getProducerIntProperty(QStringLiteral("meta.media.width"));
- int frameHeight = transitionClip->binClip()->getProducerIntProperty(QStringLiteral("meta.media.height"));
- double factor = transitionClip->binClip()->getProducerProperty(QStringLiteral("aspect_ratio")).toDouble();
- if (factor == 0) factor = 1.0;
- p.setX((int)(frameWidth * factor + 0.5));
- p.setY(frameHeight);
- }
- emit transitionItemSelected(trans, getPreviousVideoTrack(info.track), p, true);*/
QMap <QString, QString> data;
data.insert(i18n("Dropped Geometry"), geometry);
slotImportClipKeyframes(TransitionWidget, trans->info(), trans->toXML(), data);