Skip to content

Commit

Permalink
Fix Properties panel not reliably updating.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Mar 20, 2015
1 parent 9621963 commit 8f73854
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/widgets/avformatproducerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ void AvformatProducerWidget::reopen(Mlt::Producer* p)

void AvformatProducerWidget::onFrameDisplayed(const SharedFrame&)
{
disconnect(MLT.videoWidget(), SIGNAL(frameDisplayed(const SharedFrame&)), this, 0);
ui->tabWidget->setTabEnabled(0, false);
ui->tabWidget->setTabEnabled(1, false);
ui->tabWidget->setTabEnabled(2, false);
Expand Down Expand Up @@ -167,6 +166,11 @@ void AvformatProducerWidget::onFrameDisplayed(const SharedFrame&)
int height = m_producer->get_int("meta.media.height");
ui->videoTableWidget->setItem(1, 1, new QTableWidgetItem(QString("%1x%2").arg(width).arg(height)));

// We can stop listening to this signal if this is audio-only or if we have
// received the video resolution.
if (videoIndex == 1 || width || height)
disconnect(MLT.videoWidget(), SIGNAL(frameDisplayed(const SharedFrame&)), this, 0);

double sar = m_producer->get_double("meta.media.sample_aspect_num");
if (m_producer->get_double("meta.media.sample_aspect_den") > 0)
sar /= m_producer->get_double("meta.media.sample_aspect_den");
Expand Down

0 comments on commit 8f73854

Please sign in to comment.