}
if (m_name.isEmpty()) m_name = url.fileName();
- if (!url.isEmpty()) {
+ if (!url.isEmpty() && QFile::exists(url.path())) {
m_thumbProd = new KThumb(clipManager, url);
if (m_clipType == AV || m_clipType == AUDIO) slotCreateAudioTimer();
}
}
void DocClipBase::slotClearAudioCache() {
+ if (m_thumbProd) m_thumbProd->stopAudioThumbs();
+ if (m_audioTimer != NULL) m_audioTimer->stop();
audioFrameChache.clear();
m_audioThumbCreated = false;
}
void DocClipBase::setClipType(CLIPTYPE type) {
m_clipType = type;
- if (m_audioTimer == NULL && (m_clipType == AV || m_clipType == AUDIO))
+ if (m_thumbProd && m_audioTimer == NULL && (m_clipType == AV || m_clipType == AUDIO))
slotCreateAudioTimer();
}
}
void DocClipBase::slotGetAudioThumbs() {
-
+ if (m_thumbProd == NULL) return;
if (m_audioThumbCreated) {
if (m_audioTimer != NULL)
m_audioTimer->stop();