Skip to content

Commit

Permalink
Make avformat producer cache a minimum of 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed May 26, 2014
1 parent 826697d commit 1ccddaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mltcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Controller::Controller()
qDebug() << "begin";
m_repo = Mlt::Factory::init();
m_profile = new Mlt::Profile;
updateAvformatCaching(5);
updateAvformatCaching(0);
qDebug() << "end";
}

Expand Down Expand Up @@ -636,7 +636,7 @@ QImage Controller::image(Producer& producer, int frameNumber, int width, int hei
void Controller::updateAvformatCaching(int trackCount)
{
int i = QThread::idealThreadCount() + trackCount;
mlt_service_cache_set_size(NULL, "producer_avformat", i);
mlt_service_cache_set_size(NULL, "producer_avformat", qMax(4, i));
}

void TransportControl::play(double speed)
Expand Down

0 comments on commit 1ccddaa

Please sign in to comment.