X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fkthumb.cpp;h=f72bd22169eb9638163bb7ac1475a5456f69df13;hb=eca725ec11f4953b20a23008cc53bbf2032b4203;hp=32673492150cef5835fdb4721637fe0e091ff741;hpb=12a38608c15e0516008e5deecf5aec029c73d2e3;p=kdenlive diff --git a/src/kthumb.cpp b/src/kthumb.cpp index 32673492..f72bd221 100644 --- a/src/kthumb.cpp +++ b/src/kthumb.cpp @@ -171,11 +171,8 @@ void KThumb::updateThumbUrl(const QString &hash) void KThumb::updateClipUrl(KUrl url, const QString &hash) { m_url = url; - if (m_producer) { - char *tmp = Render::decodedString(url.path()); - m_producer->set("resource", tmp); - delete[] tmp; - } + if (m_producer) + m_producer->set("resource", url.path().toUtf8().constData()); m_thumbFile = m_clipManager->projectFolder() + "/thumbs/" + hash + ".thumb"; } @@ -216,17 +213,13 @@ QPixmap KThumb::extractImage(int frame, int width, int height) //static QPixmap KThumb::getImage(KUrl url, int frame, int width, int height) { - char *tmp = Render::decodedString(KdenliveSettings::current_profile()); - Mlt::Profile profile(tmp); - delete[] tmp; + Mlt::Profile profile(KdenliveSettings::current_profile().toUtf8().constData()); QPixmap pix(width, height); if (url.isEmpty()) return pix; - tmp = Render::decodedString(url.path()); //""); //Mlt::Producer producer(profile, "xml-string", tmp); - Mlt::Producer *producer = new Mlt::Producer(profile, tmp); - delete[] tmp; + Mlt::Producer *producer = new Mlt::Producer(profile, url.path().toUtf8().constData()); pix = QPixmap::fromImage(getFrame(producer, frame, width, height)); delete producer; @@ -283,9 +276,7 @@ void KThumb::getImage(KUrl url, int frame, int width, int height) { if (url.isEmpty()) return; QPixmap image(width, height); - char *tmp = KRender::decodedString(url.path()); - Mlt::Producer m_producer(tmp); - delete tmp; + Mlt::Producer m_producer(url.path().toUtf8().constData()); image.fill(Qt::black); if (m_producer.is_blank()) { @@ -313,9 +304,7 @@ void KThumb::getThumbs(KUrl url, int startframe, int endframe, int width, int he { if (url.isEmpty()) return; QPixmap image(width, height); - char *tmp = KRender::decodedString(url.path()); - Mlt::Producer m_producer(tmp); - delete tmp; + Mlt::Producer m_producer(url.path().toUtf8().constData()); image.fill(Qt::black); if (m_producer.is_blank()) {