decoder: don't start indexing any stream that doesn't need to be

This commit is contained in:
itsmattkc
2020-02-21 20:04:08 +11:00
parent 04759b88cf
commit 6c33e85162
+6 -4
View File
@@ -138,10 +138,12 @@ bool Decoder::ProbeMedia(Footage *f, const QAtomicInt* cancelled)
// Start an index task
foreach (StreamPtr stream, f->streams()) {
QMetaObject::invokeMethod(IndexManager::instance(),
"StartIndexingStream",
Qt::QueuedConnection,
Q_ARG(StreamPtr, stream));
if (stream->type() == Stream::kAudio) {
QMetaObject::invokeMethod(IndexManager::instance(),
"StartIndexingStream",
Qt::QueuedConnection,
Q_ARG(StreamPtr, stream));
}
}
return true;