Skip to content

Commit

Permalink
Fix setting image longer than 10 minutes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 30, 2014
1 parent 94ae6c8 commit 38755e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widgets/imageproducerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ void ImageProducerWidget::reopen(Mlt::Producer* p)
{
int out = ui->durationSpinBox->value() - 1;
int position = m_producer->position();
double speed = m_producer->get_speed();

if (out + 1 > p->get_length())
p->set("length", out + 1);
p->set("out", out);
if (position > p->get_out())
position = p->get_out();
Expand All @@ -98,7 +99,6 @@ void ImageProducerWidget::reopen(Mlt::Producer* p)
emit producerReopened();
emit producerChanged();
MLT.seek(position);
MLT.play(speed);
setProducer(p);
}

Expand Down Expand Up @@ -135,7 +135,7 @@ void ImageProducerWidget::on_durationSpinBox_editingFinished()
{
if (!m_producer)
return;
if (ui->durationSpinBox->value() == m_producer->get_length())
if (ui->durationSpinBox->value() == m_producer->get_out() + 1)
return;
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 38755e9

Please sign in to comment.