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

Fix black frame at end when rendering full project

CCBUG: 373072
parent d212d920
......@@ -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())
......
......@@ -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)
......
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