]> git.sesse.net Git - kdenlive/commitdiff
forgot to commit that small change, fixes compilation
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 31 Oct 2008 10:08:36 +0000 (10:08 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 31 Oct 2008 10:08:36 +0000 (10:08 +0000)
svn path=/branches/KDE4/; revision=2607

src/kthumb.cpp
src/kthumb.h

index 573d379011eb04ae408789439bf92847d953ffa2..b821e93fc68c306a2194beebc7bf9b56d0abc204 100644 (file)
@@ -145,6 +145,10 @@ void KThumb::setProducer(Mlt::Producer *producer) {
     m_dar = producer->profile()->dar();
 }
 
+bool KThumb::hasProducer() const {
+    return m_producer != NULL;
+}
+
 void KThumb::updateClipUrl(KUrl url) {
     m_url = url;
     if (m_producer) {
@@ -165,6 +169,7 @@ void KThumb::extractImage(int frame, int frame2) {
 
     const int twidth = (int)(KdenliveSettings::trackheight() * m_dar);
     const int theight = KdenliveSettings::trackheight();
+
     mlt_image_format format = mlt_image_yuv422;
     if (m_producer->is_blank()) {
         QPixmap pix(twidth, theight);
@@ -177,6 +182,7 @@ void KThumb::extractImage(int frame, int frame2) {
         //videoThumbProducer.getThumb(frame);
         m_producer->seek(frame);
         mltFrame = m_producer->get_frame();
+        if (frame2 != -1) m_producer->seek(frame2);
         if (!mltFrame) {
             kDebug() << "///// BROKEN FRAME";
             QPixmap p(twidth, theight);
@@ -184,7 +190,6 @@ void KThumb::extractImage(int frame, int frame2) {
             emit thumbReady(frame, p);
             return;
         } else {
-            if (frame2 != -1) m_producer->seek(frame2);
             int frame_width = 0;
             int frame_height = 0;
             mltFrame->set("normalised_height", theight);
index b7374d35444396caa6ec26e89a3f1fb581478c90..4c3d048c9521c8dd74ba34704db9dd965a1591bd 100644 (file)
@@ -82,6 +82,7 @@ Q_OBJECT public:
     ~KThumb();
     void setProducer(Mlt::Producer *producer);
     void askForAudioThumbs(const QString &id);
+    bool hasProducer() const;
 
 public slots:
     void extractImage(int frame, int frame2);