summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <jb@kdenlive.org>2016-12-04 16:37:58 (GMT)
committerJean-Baptiste Mardelle <jb@kdenlive.org>2016-12-04 16:37:58 (GMT)
commit9869d0b0cd75958cf2de3b53a57d578887dd7ba2 (patch)
tree0b49c7b64e273c6a2e35e3f38dc524ab3614d0e2
parentd212d92068e8e40ff26014043d1b7f73104a92fd (diff)
Fix black frame at end when rendering full project
CCBUG: 373072
-rw-r--r--src/dialogs/renderwidget.cpp7
-rw-r--r--src/mainwindow.cpp21
2 files changed, 12 insertions, 16 deletions
diff --git a/src/dialogs/renderwidget.cpp b/src/dialogs/renderwidget.cpp
index c367ae1..5ff1006 100644
--- a/src/dialogs/renderwidget.cpp
+++ b/src/dialogs/renderwidget.cpp
@@ -1106,14 +1106,13 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut,
zoneOut /= ratio;
}
}
-
- if (m_view.render_zone->isChecked()) {
- render_process_args << "in=" + QString::number(zoneIn) << "out=" + QString::number(zoneOut);
- } else if (m_view.render_guide->isChecked()) {
+ if (m_view.render_guide->isChecked()) {
double fps = (double) m_profile.frame_rate_num / m_profile.frame_rate_den;
double guideStart = m_view.guide_start->itemData(m_view.guide_start->currentIndex()).toDouble();
double guideEnd = m_view.guide_end->itemData(m_view.guide_end->currentIndex()).toDouble();
render_process_args << "in=" + QString::number((int) GenTime(guideStart).frames(fps)) << "out=" + QString::number((int) GenTime(guideEnd).frames(fps));
+ } else {
+ render_process_args << "in=" + QString::number(zoneIn) << "out=" + QString::number(zoneOut);
}
if (!overlayargs.isEmpty())
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index db185af..da0c844 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -3312,15 +3312,16 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
temp.open();
playlistPath = temp.fileName();
}
+ int in = 0;
+ int out;
+ if (zoneOnly) {
+ in = pCore->projectManager()->currentTimeline()->inPoint();
+ out = pCore->projectManager()->currentTimeline()->outPoint();
+ } else {
+ out = (int) GenTime(project->projectDuration()).frames(project->fps()) - 2;
+ }
QString playlistContent = pCore->projectManager()->projectSceneList(project->url().adjusted(QUrl::RemoveFilename).path());
if (!chapterFile.isEmpty()) {
- int in = 0;
- int out;
- if (!zoneOnly) out = (int) GenTime(project->projectDuration()).frames(project->fps());
- else {
- in = pCore->projectManager()->currentTimeline()->inPoint();
- out = pCore->projectManager()->currentTimeline()->outPoint();
- }
QDomDocument doc;
QDomElement chapters = doc.createElement(QStringLiteral("chapters"));
chapters.setAttribute(QStringLiteral("fps"), project->fps());
@@ -3507,11 +3508,7 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
}
file.close();
}
- m_renderWidget->slotExport(scriptExport,
- pCore->projectManager()->currentTimeline()->inPoint(),
- pCore->projectManager()->currentTimeline()->outPoint(),
- project->metadata(),
- playlistPaths, trackNames, scriptPath, exportAudio);
+ m_renderWidget->slotExport(scriptExport, in, out,project->metadata(), playlistPaths, trackNames, scriptPath, exportAudio);
}
void MainWindow::slotUpdateTimecodeFormat(int ix)