From 9894995949555e024480d39ff5b0f83b44dc46dc Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Fri, 31 Oct 2008 10:08:36 +0000 Subject: [PATCH] forgot to commit that small change, fixes compilation svn path=/branches/KDE4/; revision=2607 --- src/kthumb.cpp | 7 ++++++- src/kthumb.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kthumb.cpp b/src/kthumb.cpp index 573d3790..b821e93f 100644 --- a/src/kthumb.cpp +++ b/src/kthumb.cpp @@ -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); diff --git a/src/kthumb.h b/src/kthumb.h index b7374d35..4c3d048c 100644 --- a/src/kthumb.h +++ b/src/kthumb.h @@ -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); -- 2.39.2