Skip to content

Commit

Permalink
Fix generating thumbnails and waveforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 30, 2014
1 parent 2755f27 commit 03dd41d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/models/multitrackmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ class AudioLevelsTask : public QRunnable
{
if (!m_tempProducer) {
QString service = m_producer.get("mlt_service");
if (service.startsWith("xml"))
if (service == "avformat-novalidate")
service = "avformat";
else if (service.startsWith("xml"))
service = "xml-nogl";
m_tempProducer = new Mlt::Producer(MLT.profile(), service.toUtf8().constData(), m_producer.get("resource"));
if (m_tempProducer->is_valid()) {
Expand Down
4 changes: 3 additions & 1 deletion src/models/playlistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ class UpdateThumbnailTask : public QRunnable
{
if (!m_tempProducer) {
QString service = m_producer.get("mlt_service");
if (service.startsWith("xml"))
if (service == "avformat-novalidate")
service = "avformat";
else if (service.startsWith("xml"))
service = "xml-nogl";
m_tempProducer = new Mlt::Producer(MLT.profile(), service.toUtf8().constData(), m_producer.get("resource"));
if (m_tempProducer->is_valid()) {
Expand Down
4 changes: 3 additions & 1 deletion src/qmltypes/thumbnailprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ QImage ThumbnailProvider::requestImage(const QString &id, QSize *size, const QSi
QString resource = id.section('/', 1);
int frameNumber = id.mid(index + 1).toInt();

if (service.startsWith("xml"))
if (service == "avformat-novalidate")
service = "avformat";
else if (service.startsWith("xml"))
service = "xml-nogl";
resource = resource.left(resource.lastIndexOf('#'));

Expand Down

0 comments on commit 03dd41d

Please sign in to comment.