]> git.sesse.net Git - kdenlive/blobdiff - src/docclipbase.cpp
Hide the "avformat-novalidate" trick for faster loading, caused crash:
[kdenlive] / src / docclipbase.cpp
index fcf99fd28892c005247c2da589f67ffdcd283163..6004a1300d25e9d810501aeb785aac3c7880f473 100644 (file)
@@ -87,35 +87,17 @@ DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QStrin
 
     if (!m_properties.contains("name")) m_properties.insert("name", url.fileName());
 
-    //if (!url.isEmpty() && QFile::exists(url.path()))
-    {
-        m_thumbProd = new KThumb(clipManager, url, m_id, m_properties.value("file_hash"));
-        if (m_clipType == AV || m_clipType == AUDIO || m_clipType == PLAYLIST) slotCreateAudioTimer();
-    }
-    //kDebug() << "type is video" << (m_clipType == AV) << " " << m_clipType;
-}
-
-/*DocClipBase & DocClipBase::operator=(const DocClipBase & clip) {
-    DocClipBase::operator=(clip);
-    m_id = clip.getId();
-    m_clipType = clip.clipType();
-    m_name = clip.name();
-    m_duration = clip.duration();
-    m_audioThumbCreated = clip.audioThumbCreated();
-    m_properties = clip.properties();
-    return *this;
-}*/
+    m_thumbProd = new KThumb(clipManager, url, m_id, m_properties.value("file_hash"));
+    if (m_clipType == AV || m_clipType == AUDIO || m_clipType == PLAYLIST) slotCreateAudioTimer();
+}
 
 DocClipBase::~DocClipBase()
 {
-    kDebug() << "CLIP " << m_id << " DELETED******************************";
     delete m_thumbProd;
     if (m_audioTimer) {
         m_audioTimer->stop();
         delete m_audioTimer;
     }
-    /*kDebug() <<" * * *CNT "<<m_baseTrackProducers.count();
-    if (m_baseTrackProducers.count() > 0) kDebug()<<"YOYO: "<<m_baseTrackProducers.at(0)->get_out()<<", CUT: "<<m_baseTrackProducers.at(0)->is_cut();*/
     qDeleteAll(m_baseTrackProducers);
     m_baseTrackProducers.clear();
     qDeleteAll(m_audioTrackProducers);
@@ -449,9 +431,9 @@ void DocClipBase::setValid()
 
 void DocClipBase::setProducer(Mlt::Producer *producer, bool reset, bool readPropertiesFromProducer)
 {
-    if (producer == NULL || !producer->is_valid()) return;
+    if (producer == NULL) return;
     if (reset) QMutexLocker locker(&m_producerMutex);
-    if (m_placeHolder) {
+    if (m_placeHolder || !producer->is_valid()) {
         char *tmp = qstrdup(i18n("Missing clip").toUtf8().constData());
         producer->set("markup", tmp);
         producer->set("bgcolour", "0xff0000ff");
@@ -1163,4 +1145,3 @@ QPixmap DocClipBase::extractImage(int frame, int width, int height)
 }
 
 
-