Skip to content

Commit

Permalink
Fix setting image duration when dropping multiple files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 30, 2014
1 parent 3701096 commit 2755f27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1938,8 +1938,8 @@ class AppendTask : public QRunnable
QString service(p.get("mlt_service"));
if (service == "pixbuf" || service == "qimage") {
p.set("ttl", 1);
p.set("length", qRound(MLT.profile().fps() * 4.0));
p.set("out", p.get_length() - 1);
p.set("length", qRound(MLT.profile().fps() * 600));
p.set("out", qRound(MLT.profile().fps() * Settings.imageDuration()) - 1);
}
MAIN.undoStack()->push(new Playlist::AppendCommand(*model, MLT.saveXML("string", &p)));
}
Expand Down
2 changes: 1 addition & 1 deletion src/mltcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int Controller::open(const QString &url)
const char *service = m_producer->get("mlt_service");
if (service && (!strcmp(service, "pixbuf") || !strcmp(service, "qimage"))) {
m_producer->set("length", qRound(profile().fps() * 600));
m_producer->set("out", profile().fps() * Settings.imageDuration() - 1);
m_producer->set("out", qRound(profile().fps() * Settings.imageDuration()) - 1);
}
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/imageproducerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void ImageProducerWidget::on_sequenceCheckBox_clicked(bool checked)
else {
m_producer->set("resource", m_producer->get("shotcut_resource"));
m_producer->set("length", qRound(MLT.profile().fps() * 600));
ui->durationSpinBox->setValue(MLT.profile().fps() * Settings.imageDuration());
ui->durationSpinBox->setValue(qRound(MLT.profile().fps() * Settings.imageDuration()));
}
Mlt::Producer* p = producer(MLT.profile());
p->pass_list(*m_producer, "force_aspect_ratio, shotcut_aspect_num, shotcut_aspect_den, "
Expand Down

0 comments on commit 2755f27

Please sign in to comment.