Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Hello,

please unblock kdenlive 16.12.1-3. It adds eleven upstream patches to fix
regressions with nvidia cards and various other bugs. On the other side I
would like to ask if I get a pre-approval for uploading kdenlive 16.12.2
(KDE Applications upgrade) to unstable/testing, which includes nearly all
of those eleven patches. It is nearly only a bugfix release.


diff -Naur '--exclude=.svn' 16.12.1-1/debian/changelog 
16.12.1-3/debian/changelog
--- 16.12.1-1/debian/changelog  2017-01-17 16:07:03.280587938 +0100
+++ 16.12.1-3/debian/changelog  2017-02-07 13:57:52.242304197 +0100
@@ -1,3 +1,33 @@
+kdenlive (16.12.1-3) unstable; urgency=low
+
+  * Add upstream patch 08-title-clip-select-twice:
+    Fix title clip items need to be selected twice before allowing move.
+  * Add upstream patch 09-aspect-transparency-issues:
+    Fix various aspect ratio issues and transparency of composite transition in
+    some cases.
+  * Add upstream patch 10-crash-razor-multiple-clips:
+    Fix crash on razor with multiple clips selected.
+  * Add upstream patch 11-project-archiving-fix:
+    Fix color clips incorrectly detected and warn before overwriting project
+    file.
+
+ -- Patrick Matthäi <pmatth...@debian.org>  Tue, 07 Feb 2017 13:23:05 +0100
+
+kdenlive (16.12.1-2) unstable; urgency=low
+
+  * Add this upstream patches, to fix some minor bugs and crashes, if you are
+    using a nvidia card with movit.
+    - 01-nvidia-crash-375094.
+      Closes: #853768
+    - 02-nvidia-crash-movit-1.
+    - 03-frame-extract-remember-folder.
+    - 04-playlist-clip-expand.
+    - 05-monitor-length-375163.
+    - 06-playaction-not-pausing.
+    - 07-nvidia-crash-movit-2.
+
+ -- Patrick Matthäi <pmatth...@debian.org>  Wed, 01 Feb 2017 11:16:36 +0100
+
 kdenlive (16.12.1-1) unstable; urgency=low

   * New upstream release.
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/01-nvidia-crash-375094.diff 
16.12.1-3/debian/patches/01-nvidia-crash-375094.diff
--- 16.12.1-1/debian/patches/01-nvidia-crash-375094.diff        1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/01-nvidia-crash-375094.diff        2017-02-07 
13:57:52.310303805 +0100
@@ -0,0 +1,55 @@
+commit 8a20fca86e9e2ce3d04b3e024b0752e19f9d8c8e
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Mon Jan 16 20:06:00 2017 +0100
+
+    Revert "Fix warning about QOffscreenSurface thread"
+    Caused startup crash on NVidia cards
+    CCBUG: 375094
+
+    This reverts commit 6675c4a509046aa3b57c60cbc3f31435e09c2df7.
+
+diff --git a/src/monitor/glwidget.cpp b/src/monitor/glwidget.cpp
+index e4089e6..cd4f56a 100644
+--- a/src/monitor/glwidget.cpp
++++ b/src/monitor/glwidget.cpp
+@@ -109,7 +109,6 @@ GLWidget::GLWidget(int id, QObject *parent)
+         mlt_properties_set_data(mlt_global_properties(), "glslManager", NULL, 
0, NULL, NULL);
+         emit gpuNotSupported();
+     }
+-    connect(this, SIGNAL(sceneGraphInitialized()), SLOT(createOffscreen()));
+     connect(this, SIGNAL(sceneGraphInitialized()), SLOT(initializeGL()), 
Qt::DirectConnection);
+     connect(this, SIGNAL(beforeRendering()), SLOT(paintGL()), 
Qt::DirectConnection);
+ }
+@@ -143,17 +142,14 @@ void GLWidget::updateAudioForAnalysis()
+       m_frameRenderer->sendAudioForAnalysis = 
KdenliveSettings::monitor_audio();
+ }
+
+-void GLWidget::createOffscreen()
++void GLWidget::initializeGL()
+ {
++    if (m_isInitialized || !isVisible() || !openglContext()) return;
+     if (!m_offscreenSurface.isValid()) {
+         m_offscreenSurface.setFormat(openglContext()->format());
+         m_offscreenSurface.create();
++        openglContext()->makeCurrent(this);
+     }
+-}
+-
+-void GLWidget::initializeGL()
+-{
+-    if (m_isInitialized || !isVisible() || !openglContext()) return;
+     initializeOpenGLFunctions();
+     qDebug() << "OpenGL vendor: " << QString::fromUtf8((const char*) 
glGetString(GL_VENDOR));
+     qDebug() << "OpenGL renderer: " << QString::fromUtf8((const char*) 
glGetString(GL_RENDERER));
+diff --git a/src/monitor/glwidget.h b/src/monitor/glwidget.h
+index dc1e0e2..d12500a 100644
+--- a/src/monitor/glwidget.h
++++ b/src/monitor/glwidget.h
+@@ -182,7 +182,6 @@ private slots:
+     void updateTexture(GLuint yName, GLuint uName, GLuint vName);
+     void paintGL();
+     void onFrameDisplayed(const SharedFrame &frame);
+-    void createOffscreen();
+
+ protected:
+     void resizeEvent(QResizeEvent* event);
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/02-nvidia-crash-movit-1.diff 
16.12.1-3/debian/patches/02-nvidia-crash-movit-1.diff
--- 16.12.1-1/debian/patches/02-nvidia-crash-movit-1.diff       1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/02-nvidia-crash-movit-1.diff       2017-02-07 
13:57:52.250304150 +0100
@@ -0,0 +1,44 @@
+commit 754b8eeed8c1a874a5535eb5136b02841a812180
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Fri Jan 20 01:15:01 2017 +0100
+
+    Fix NVIDIA crash with GPU accel (movit)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index fc93963..b081e05 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
+     // Force QDomDocument to use a deterministic XML attribute order
+     extern Q_CORE_EXPORT QBasicAtomicInt qt_qhash_seed;
+     qt_qhash_seed.store(0);
+-
++    QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
+ #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+     QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
+ #endif
+diff --git a/src/mltcontroller/producerqueue.cpp 
b/src/mltcontroller/producerqueue.cpp
+index 07fd234..aa06cf6 100644
+--- a/src/mltcontroller/producerqueue.cpp
++++ b/src/mltcontroller/producerqueue.cpp
+@@ -299,7 +299,19 @@ void ProducerQueue::processFileProperties()
+                 } else if (service.contains(QStringLiteral("avformat"))) {
+                     Mlt::Profile *blankProfile = new Mlt::Profile();
+                     blankProfile->set_explicit(false);
+-                    blankProfile->from_producer(*producer);
++                    if (KdenliveSettings::gpu_accel()) {
++                        Clip clp(*producer);
++                        Mlt::Producer *glProd = 
clp.softClone(ClipController::getPassPropertiesList());
++                        Mlt::Filter scaler(*m_binController->profile(), 
"swscale");
++                        Mlt::Filter converter(*m_binController->profile(), 
"avcolor_space");
++                        glProd->attach(scaler);
++                        glProd->attach(converter);
++                        blankProfile->from_producer(*glProd);
++                        delete glProd;
++                    }
++                    else {
++                        blankProfile->from_producer(*producer);
++                    }
+                     MltVideoProfile clipProfile = 
ProfilesDialog::getVideoProfile(*blankProfile);
+                     MltVideoProfile projectProfile = 
ProfilesDialog::getVideoProfile(*m_binController->profile());
+                     clipProfile.adjustWidth();
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/03-frame-extract-remember-folder.diff 
16.12.1-3/debian/patches/03-frame-extract-remember-folder.diff
--- 16.12.1-1/debian/patches/03-frame-extract-remember-folder.diff      
1970-01-01 01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/03-frame-extract-remember-folder.diff      
2017-02-07 13:57:52.286303943 +0100
@@ -0,0 +1,53 @@
+commit 901c3ecfd2e2455eac6f5dc27ee87d66f2ddb87a
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Fri Jan 20 13:51:05 2017 +0100
+
+    Fix extract frame not remembering folder
+
+diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
+index ae40089..ba43215 100644
+--- a/src/monitor/monitor.cpp
++++ b/src/monitor/monitor.cpp
+@@ -971,9 +971,9 @@ void Monitor::slotExtractCurrentFrameToProject()
+     slotExtractCurrentFrame(QString(), true);
+ }
+
+-void Monitor::slotExtractCurrentFrame(QString path, bool addToProject)
++void Monitor::slotExtractCurrentFrame(QString frameName, bool addToProject)
+ {
+-    if (addToProject && QFileInfo(path).fileName().isEmpty()) {
++    if (addToProject && QFileInfo(frameName).fileName().isEmpty()) {
+         // convenience: when extracting an image to be added to the project,
+         // suggest a suitable image file name. In the project monitor, this
+         // suggestion bases on the project file name; in the clip monitor,
+@@ -989,7 +989,7 @@ void Monitor::slotExtractCurrentFrame(QString path, bool 
addToProject)
+                                     + QStringLiteral("-f")
+                                     + 
QString::number(render->seekFramePosition())
+                                     + ".png";
+-        path = QFileInfo(path, suggestedImageName).absoluteFilePath();
++        frameName = QFileInfo(frameName, suggestedImageName).fileName();
+     }
+
+     QString framesFolder = KRecentDirs::dir(":KdenliveFramesFolder");
+@@ -998,7 +998,7 @@ void Monitor::slotExtractCurrentFrame(QString path, bool 
addToProject)
+     fs->setMimeTypeFilters(QStringList() << QStringLiteral("image/png"));
+     fs->setAcceptMode(QFileDialog::AcceptSave);
+     fs->setDefaultSuffix(QStringLiteral("png"));
+-    fs->selectFile(path);
++    fs->selectFile(frameName);
+     if (fs->exec()) {
+         if (!fs->selectedFiles().isEmpty()) {
+             QUrl savePath = fs->selectedUrls().first();
+diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h
+index 27dd0e6..b79ddd9 100644
+--- a/src/monitor/monitor.h
++++ b/src/monitor/monitor.h
+@@ -241,7 +241,7 @@ private:
+ private slots:
+     void seekCursor(int pos);
+     void rendererStopped(int pos);
+-    void slotExtractCurrentFrame(QString path = QString(), bool addToProject 
= false);
++    void slotExtractCurrentFrame(QString frameName = QString(), bool 
addToProject = false);
+     void slotExtractCurrentFrameToProject();
+     void slotSetThumbFrame();
+     void slotSaveZone();
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/04-playlist-clip-expand.diff 
16.12.1-3/debian/patches/04-playlist-clip-expand.diff
--- 16.12.1-1/debian/patches/04-playlist-clip-expand.diff       1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/04-playlist-clip-expand.diff       2017-02-07 
13:57:52.270304035 +0100
@@ -0,0 +1,19 @@
+commit b9ccc837ef9759155d768a40a1f8dd49fd7b9c29
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Fri Jan 20 13:51:31 2017 +0100
+
+    Fix typo breaking playlist clip expand
+
+diff --git a/src/timeline/customtrackview.cpp 
b/src/timeline/customtrackview.cpp
+index 3fd84c0..769ac0c 100644
+--- a/src/timeline/customtrackview.cpp
++++ b/src/timeline/customtrackview.cpp
+@@ -6373,7 +6373,7 @@ void CustomTrackView::expandActiveClip()
+     }
+     ClipItem *clip = static_cast < ClipItem *>(item);
+     const QString url = clip->binClip()->url();
+-    if (clip->clipType() != Playlist || !url.isEmpty()) {
++    if (clip->clipType() != Playlist || url.isEmpty()) {
+         emit displayMessage(i18n("You must select a playlist clip for this 
action"), ErrorMessage);
+         return;
+     }
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/05-monitor-length-375163.diff 
16.12.1-3/debian/patches/05-monitor-length-375163.diff
--- 16.12.1-1/debian/patches/05-monitor-length-375163.diff      1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/05-monitor-length-375163.diff      2017-02-07 
13:57:52.302303851 +0100
@@ -0,0 +1,20 @@
+commit f540402274e8db9912136e8aacfe60fe124e2c7d
+Author: Mikko Rapeli <mikko.rap...@iki.fi>
+Date:   Fri Jan 20 14:23:10 2017 +0100
+
+    Fix playing Zone breaks monitor ruler length
+    BUG: 375163
+
+diff --git a/src/renderer.cpp b/src/renderer.cpp
+index d5f64bc..3020e04 100644
+--- a/src/renderer.cpp
++++ b/src/renderer.cpp
+@@ -396,7 +396,7 @@ bool Render::setProducer(Mlt::Producer *producer, int 
position, bool isActive)
+     if (isActive) {
+         startConsumer();
+     }
+-    emit durationChanged(m_mltProducer->get_playtime() - 1, 
m_mltProducer->get_in());
++    emit durationChanged(m_mltProducer->get_length() - 1, 
m_mltProducer->get_in());
+     position = m_mltProducer->position();
+     emit rendererPosition(position);
+     return true;
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/06-playaction-not-pausing.diff 
16.12.1-3/debian/patches/06-playaction-not-pausing.diff
--- 16.12.1-1/debian/patches/06-playaction-not-pausing.diff     1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/06-playaction-not-pausing.diff     2017-02-07 
13:57:52.294303897 +0100
@@ -0,0 +1,33 @@
+commit 9aca0ee731bcb3db2e9924901e339555bdfa1f20
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Fri Jan 20 14:29:05 2017 +0100
+
+    Fix play action not pausing when switching between subclips
+
+diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
+index ba43215..91058ea 100644
+--- a/src/monitor/monitor.cpp
++++ b/src/monitor/monitor.cpp
+@@ -1345,7 +1345,6 @@ void Monitor::slotOpenClip(ClipController *controller, 
int in, int out)
+     if (render == NULL) {
+         return;
+     }
+-    bool sameClip = controller == m_controller && controller != NULL;
+     m_controller = controller;
+     if (!m_glMonitor->isVisible()) {
+         // Don't load clip if monitor is not active (disabled)
+@@ -1357,11 +1356,9 @@ void Monitor::slotOpenClip(ClipController *controller, 
int in, int out)
+             return;
+       }
+         updateMarkers();
+-        if (!sameClip) {
+-            // Loading new clip, stop if playing
+-            if (m_playAction->isActive()) {
+-                m_playAction->setActive(false);
+-            }
++        // Loading new clip / zone, stop if playing
++        if (m_playAction->isActive()) {
++            m_playAction->setActive(false);
+         }
+         render->setProducer(m_controller->masterProducer(), in, isActive());
+       if (out > -1) {
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/07-nvidia-crash-movit-2.diff 
16.12.1-3/debian/patches/07-nvidia-crash-movit-2.diff
--- 16.12.1-1/debian/patches/07-nvidia-crash-movit-2.diff       1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/07-nvidia-crash-movit-2.diff       2017-02-07 
13:57:52.290303920 +0100
@@ -0,0 +1,27 @@
+commit 048a3d746459fc2f0dd68aa350e96c771b1e8a53
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Fri Jan 20 18:16:39 2017 +0100
+
+    Fix crash when opening titler with movit GPU
+
+diff --git a/src/doc/kthumb.cpp b/src/doc/kthumb.cpp
+index 64728c9..92aeeaf 100644
+--- a/src/doc/kthumb.cpp
++++ b/src/doc/kthumb.cpp
+@@ -44,6 +44,16 @@ QPixmap KThumb::getImage(const QUrl &url, int frame, int 
width, int height)
+     QPixmap pix(width, height);
+     if (!url.isValid()) return pix;
+     Mlt::Producer *producer = new Mlt::Producer(profile, 
url.toLocalFile().toUtf8().constData());
++    if (KdenliveSettings::gpu_accel()) {
++        QString service = producer->get("mlt_service");
++        QString res = producer->get("resource");
++        delete producer;
++        producer = new Mlt::Producer(profile, service.toUtf8().constData(), 
res.toUtf8().constData());
++        Mlt::Filter scaler(profile, "swscale");
++        Mlt::Filter converter(profile, "avcolor_space");
++        producer->attach(scaler);
++        producer->attach(converter);
++    }
+     pix = QPixmap::fromImage(getFrame(producer, frame, width, height));
+     delete producer;
+     return pix;
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/08-title-clip-select-twice.diff 
16.12.1-3/debian/patches/08-title-clip-select-twice.diff
--- 16.12.1-1/debian/patches/08-title-clip-select-twice.diff    1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/08-title-clip-select-twice.diff    2017-02-07 
13:57:52.258304105 +0100
@@ -0,0 +1,72 @@
+commit 91b268c2727105afcfddf082678c10704c348862
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Fri Feb 3 12:05:13 2017 +0100
+
+    Fix title clip items need to be selected twice before allowing move
+
+diff --git a/src/effectstack/graphicsscenerectmove.cpp 
b/src/effectstack/graphicsscenerectmove.cpp
+index be98dd9..014cdfd 100644
+--- a/src/effectstack/graphicsscenerectmove.cpp
++++ b/src/effectstack/graphicsscenerectmove.cpp
+@@ -656,7 +656,6 @@ void 
GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
+                 
viewlist.first()->setRubberBandSelectionMode(Qt::IntersectsItemShape);
+             }
+         }
+-        QList<QGraphicsItem *> selected = selectedItems();
+         bool alreadySelected = false;
+         foreach(QGraphicsItem *g, list) {
+             //qDebug() << " - - CHECKING ITEM Z:" << g->zValue() << ", TYPE: 
" << g->type();
+@@ -673,7 +672,10 @@ void 
GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
+         }
+         if (item == NULL || (e->modifiers() != Qt::ShiftModifier && 
!alreadySelected)) {
+             clearTextSelection();
+-        } else if (item && item->flags() & QGraphicsItem::ItemIsMovable) {
++        } else if (e->modifiers() & Qt::ShiftModifier) {
++            clearTextSelection(false);
++        }
++        if (item && item->flags() & QGraphicsItem::ItemIsMovable) {
+             m_sceneClickPoint = e->scenePos();
+             m_selectedItem = item;
+             //qDebug() << "/////////  ITEM TYPE: " << item->type();
+@@ -743,7 +745,7 @@ void 
GraphicsSceneRectMove::mousePressEvent(QGraphicsSceneMouseEvent* e)
+     //qDebug() << "//////  MOUSE CLICK, RESIZE MODE: " << m_resizeMode;
+ }
+
+-void GraphicsSceneRectMove::clearTextSelection()
++void GraphicsSceneRectMove::clearTextSelection(bool reset)
+ {
+     if (m_selectedItem && m_selectedItem->type() == QGraphicsTextItem::Type) {
+         // disable text editing
+@@ -754,7 +756,9 @@ void GraphicsSceneRectMove::clearTextSelection()
+         t->setTextInteractionFlags(Qt::NoTextInteraction);
+     }
+     m_selectedItem = NULL;
+-    clearSelection();
++    if (reset) {
++        clearSelection();
++    }
+ }
+
+ void GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e)
+@@ -776,7 +780,6 @@ void 
GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e)
+     if (e->buttons() != Qt::NoButton && !m_moveStarted) {
+         if ((view->mapFromScene(e->scenePos()) - 
view->mapFromScene(m_clickPoint)).manhattanLength() < 
QApplication::startDragDistance()) {
+             e->ignore();
+-            QGraphicsScene::mouseMoveEvent(e);
+             return;
+         } else {
+             m_moveStarted = true;
+diff --git a/src/effectstack/graphicsscenerectmove.h 
b/src/effectstack/graphicsscenerectmove.h
+index 38f1cfe..f798e62 100644
+--- a/src/effectstack/graphicsscenerectmove.h
++++ b/src/effectstack/graphicsscenerectmove.h
+@@ -118,7 +118,8 @@ public:
+     void setZoom(double s);
+     void setTool(TITLETOOL tool);
+     TITLETOOL tool() const;
+-    void clearTextSelection();
++    /** @brief Get out of text edit mode. If reset is true, we also unselect 
all items */
++    void clearTextSelection(bool reset = true);
+     int gridSize() const;
+     void addNewItem(QGraphicsItem *item);
+
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/09-aspect-transparency-issues.diff 
16.12.1-3/debian/patches/09-aspect-transparency-issues.diff
--- 16.12.1-1/debian/patches/09-aspect-transparency-issues.diff 1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/09-aspect-transparency-issues.diff 2017-02-07 
13:57:52.278303990 +0100
@@ -0,0 +1,164 @@
+commit 67257981b15cd472a08e0fffc9c54072da6b617a
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Sat Feb 4 16:32:01 2017 +0100
+
+    Fix various aspect ratio issues and transparency of composite transition 
in some cases
+
+diff --git a/src/bin/projectclip.cpp b/src/bin/projectclip.cpp
+index a40c38d..dd5d100 100644
+--- a/src/bin/projectclip.cpp
++++ b/src/bin/projectclip.cpp
+@@ -921,7 +921,7 @@ void ProjectClip::doExtractImage()
+         frame->set("deinterlace_method", "onefield");
+         frame->set("top_field_first", -1 );
+       if (frame && frame->is_valid()) {
+-            img = KThumb::getFrame(frame, frameWidth, 150);
++            img = KThumb::getFrame(frame, frameWidth, 150, 
prod->profile()->sar() != 1);
+             bin()->cachePixmap(path, img);
+             emit thumbReady(pos, img);
+         }
+diff --git a/src/doc/kthumb.cpp b/src/doc/kthumb.cpp
+index 92aeeaf..eb633e2 100644
+--- a/src/doc/kthumb.cpp
++++ b/src/doc/kthumb.cpp
+@@ -82,17 +82,16 @@ QImage KThumb::getFrame(Mlt::Producer *producer, int 
framepos, int displayWidth,
+
+
+ //static
+-QImage KThumb::getFrame(Mlt::Frame *frame, int width, int height)
++QImage KThumb::getFrame(Mlt::Frame *frame, int width, int height, bool 
forceRescale)
+ {
+     if (frame == NULL || !frame->is_valid()) {
+         QImage p(width, height, QImage::Format_ARGB32_Premultiplied);
+         p.fill(QColor(Qt::red).rgb());
+         return p;
+     }
+-    int ow = width;
+-    int oh = height;
++    int ow = forceRescale ? 0 : width;
++    int oh = forceRescale ? 0 : height;
+     mlt_image_format format = mlt_image_rgb24a;
+-    //frame->set("progressive", "1");
+     ow += ow % 2;
+     const uchar* imagedata = frame->get_image(format, ow, oh);
+     if (imagedata) {
+diff --git a/src/doc/kthumb.h b/src/doc/kthumb.h
+index 2262840..a36e8f6 100644
+--- a/src/doc/kthumb.h
++++ b/src/doc/kthumb.h
+@@ -39,7 +39,7 @@ namespace KThumb
+     QPixmap getImage(const QUrl &url, int width, int height = -1);
+     QPixmap getImage(const QUrl &url, int frame, int width, int height = -1);
+     QImage getFrame(Mlt::Producer *producer, int framepos, int displayWidth, 
int height);
+-    QImage getFrame(Mlt::Frame *frame, int width, int height);
++    QImage getFrame(Mlt::Frame *frame, int width, int height, bool 
forceRescale = false);
+     /** @brief Calculates image variance, useful to know if a thumbnail is 
interesting.
+      *  @return an integer between 0 and 100. 0 means no variance, eg. black 
image while bigger values mean contrasted image
+      * */
+diff --git a/src/effectslist/initeffects.cpp b/src/effectslist/initeffects.cpp
+index 05c511d..6111003 100644
+--- a/src/effectslist/initeffects.cpp
++++ b/src/effectslist/initeffects.cpp
+@@ -757,7 +757,9 @@ void initEffects::fillTransitionsList(Mlt::Repository 
*repository, EffectsList *
+                 desc.appendChild(ret.createTextNode(i18n("A key-framable 
alpha-channel compositor for two frames.")));
+                 paramList.append(quickParameterFill(ret, i18n("Geometry"), 
QStringLiteral("geometry"), QStringLiteral("geometry"), 
QStringLiteral("0%/0%:100%x100%:100"), QStringLiteral("-500;-500;-500;-500;0"), 
QStringLiteral("500;500;500;500;100")));
+                 paramList.append(quickParameterFill(ret, i18n("Alpha Channel 
Operation"), QStringLiteral("operator"), QStringLiteral("list"), 
QStringLiteral("over"), QLatin1String(""), QLatin1String(""), 
QStringLiteral("over,and,or,xor"), i18n("Over,And,Or,Xor")));
+-                paramList.append(quickParameterFill(ret, i18n("Align"), 
QStringLiteral("aligned"), QStringLiteral("bool"), QStringLiteral("0"), 
QStringLiteral("0"), QStringLiteral("1")));
++                paramList.append(quickParameterFill(ret, i18n("Align"), 
QStringLiteral("aligned"), QStringLiteral("bool"), QStringLiteral("1"), 
QStringLiteral("0"), QStringLiteral("1")));
++                paramList.append(quickParameterFill(ret, i18n("Align"), 
QStringLiteral("valign"), QStringLiteral("fixed"), QStringLiteral("middle"), 
QStringLiteral("middle"), QStringLiteral("middle")));
++                paramList.append(quickParameterFill(ret, i18n("Align"), 
QStringLiteral("halign"), QStringLiteral("fixed"), QStringLiteral("centre"), 
QStringLiteral("centre"), QStringLiteral("centre")));
+                 paramList.append(quickParameterFill(ret, i18n("Fill"), 
QStringLiteral("fill"), QStringLiteral("bool"), QStringLiteral("1"), 
QStringLiteral("0"), QStringLiteral("1")));
+                 paramList.append(quickParameterFill(ret, i18n("Distort"), 
QStringLiteral("distort"), QStringLiteral("bool"), QStringLiteral("0"), 
QStringLiteral("0"), QStringLiteral("1")));
+                 paramList.append(quickParameterFill(ret, i18n("Wipe Method"), 
QStringLiteral("luma"), QStringLiteral("list"), QLatin1String(""), 
QLatin1String(""), QLatin1String(""), QStringLiteral("%lumaPaths"), 
QLatin1String("")));
+diff --git a/src/mltcontroller/producerqueue.cpp 
b/src/mltcontroller/producerqueue.cpp
+index aa06cf6..95be8c3 100644
+--- a/src/mltcontroller/producerqueue.cpp
++++ b/src/mltcontroller/producerqueue.cpp
+@@ -135,6 +135,7 @@ void ProducerQueue::processFileProperties()
+     requestClipInfo info;
+     QLocale locale;
+     locale.setNumberOptions(QLocale::OmitGroupSeparator);
++    bool forceThumbScale = m_binController->profile()->sar() != 1;
+     while (!m_requestList.isEmpty()) {
+         m_infoMutex.lock();
+         info = m_requestList.takeFirst();
+@@ -161,7 +162,7 @@ void ProducerQueue::processFileProperties()
+             Mlt::Frame *frame = prod->get_frame();
+             if (frame && frame->is_valid()) {
+                 int fullWidth = info.imageHeight * 
m_binController->profile()->dar() + 0.5;
+-                QImage img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight);
++                QImage img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight, forceThumbScale);
+                 emit replyGetImage(info.clipId, img);
+             }
+             delete frame;
+@@ -483,7 +484,7 @@ void ProducerQueue::processFileProperties()
+                     if (frameNumber > 0) producer->seek(frameNumber);
+                     frame = producer->get_frame();
+                     if (frame && frame->is_valid()) {
+-                        img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight);
++                        img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight, forceThumbScale);
+                         emit replyGetImage(info.clipId, img);
+                     }
+                 }
+@@ -659,7 +660,7 @@ void ProducerQueue::processFileProperties()
+                     img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight);
+                     delete glProd;
+                 } else {
+-                    img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight);
++                    img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight, forceThumbScale);
+                 }
+                 emit replyGetImage(info.clipId, img);
+             }
+@@ -697,7 +698,7 @@ void ProducerQueue::processFileProperties()
+                     else {
+                         tmpProd = producer;
+                     }
+-                    QImage img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight);
++                    QImage img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight, forceThumbScale);
+                     if (frameNumber == -1) {
+                         // No user specipied frame, look for best one
+                         int variance = KThumb::imageVariance(img);
+@@ -707,7 +708,7 @@ void ProducerQueue::processFileProperties()
+                             frameNumber =  duration > 100 ? 100 : duration / 
2 ;
+                             tmpProd->seek(frameNumber);
+                             frame = tmpProd->get_frame();
+-                            img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight);
++                            img = KThumb::getFrame(frame, fullWidth, 
info.imageHeight, forceThumbScale);
+                         }
+                     }
+                     if (KdenliveSettings::gpu_accel()) {
+@@ -889,7 +890,7 @@ void ProducerQueue::slotMultiStreamProducerFound(const 
QString &path, QList<int>
+     dialog->connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept()));
+     dialog->connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));
+     okButton->setText(i18n("Import selected clips"));
+-
++
+     QLabel *lab1 = new QLabel(i18n("Additional streams for clip\n %1", path), 
mainWidget);
+     mainLayout->addWidget(lab1);
+     QList <QGroupBox*> groupList;
+diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
+index 91058ea..a1c1ad9 100644
+--- a/src/monitor/monitor.cpp
++++ b/src/monitor/monitor.cpp
+@@ -520,8 +520,8 @@ void Monitor::slotForceSize(QAction *a)
+     if (resizeType > 0) {
+         // calculate size
+         QRect r = QApplication::desktop()->screenGeometry();
+-        profileWidth = m_glMonitor->profileSize().width() * resizeType / 100;
+         profileHeight = m_glMonitor->profileSize().height() * resizeType / 
100;
++        profileWidth = m_glMonitor->profile()->dar() * profileHeight;
+         if (profileWidth > r.width() * 0.8 || profileHeight > r.height() * 
0.7) {
+             // reset action to free resize
+             QList< QAction * > list = m_forceSize->actions ();
+diff --git a/src/timeline/transitionhandler.cpp 
b/src/timeline/transitionhandler.cpp
+index b6bbc99..237f870 100644
+--- a/src/timeline/transitionhandler.cpp
++++ b/src/timeline/transitionhandler.cpp
+@@ -640,7 +640,6 @@ void TransitionHandler::rebuildTransitions(int mode, QList 
<int> videoTracks, in
+         if (mode == 1) {
+             transition.set("valign", "middle");
+             transition.set("halign", "centre");
+-          transition.set("aligned", 0);
+             transition.set("fill", 1);
+             transition.set("geometry", 
compositeGeometry.toUtf8().constData());
+         }
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/10-crash-razor-multiple-clips.diff 
16.12.1-3/debian/patches/10-crash-razor-multiple-clips.diff
--- 16.12.1-1/debian/patches/10-crash-razor-multiple-clips.diff 1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/10-crash-razor-multiple-clips.diff 2017-02-07 
13:57:52.294303897 +0100
@@ -0,0 +1,42 @@
+commit 6d71034c432bb009947f6fff5757564521aa66fe
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Sun Feb 5 23:53:29 2017 +0100
+
+    Fix crash on razor with multiple clips selected
+    BUG: 376082
+
+diff --git a/src/timeline/customtrackview.cpp 
b/src/timeline/customtrackview.cpp
+index 769ac0c..4cf868e 100644
+--- a/src/timeline/customtrackview.cpp
++++ b/src/timeline/customtrackview.cpp
+@@ -4315,6 +4315,8 @@ void 
CustomTrackView::cutSelectedClips(QList<QGraphicsItem *> itemList, GenTime
+         if (under)
+             itemList << under;
+     }
++    QUndoCommand *command = new QUndoCommand;
++    command->setText(i18n("Razor clip"));
+     for (int i = 0; i < itemList.count(); ++i) {
+         if (!itemList.at(i))
+             continue;
+@@ -4325,8 +4327,7 @@ void 
CustomTrackView::cutSelectedClips(QList<QGraphicsItem *> itemList, GenTime
+                 if (!groups.contains(group))
+                     groups << group;
+             } else if (currentPos > item->startPos() && currentPos < 
item->endPos()) {
+-                RazorClipCommand *command = new RazorClipCommand(this, 
item->info(), item->effectList(), currentPos);
+-                m_commandStack->push(command);
++                new RazorClipCommand(this, item->info(), item->effectList(), 
currentPos, true, command);
+             }
+         } else if (itemList.at(i)->type() == GroupWidget && itemList.at(i) != 
m_selectionGroup) {
+             AbstractGroupItem *group = static_cast<AbstractGroupItem 
*>(itemList.at(i));
+@@ -4334,6 +4335,11 @@ void 
CustomTrackView::cutSelectedClips(QList<QGraphicsItem *> itemList, GenTime
+                 groups << group;
+         }
+     }
++    if (command->childCount() > 0) {
++        m_commandStack->push(command);
++    } else {
++        delete command;
++    }
+
+     for (int i = 0; i < groups.count(); ++i)
+         razorGroup(groups.at(i), currentPos);
diff -Naur '--exclude=.svn' 
16.12.1-1/debian/patches/11-project-archiving-fix.diff 
16.12.1-3/debian/patches/11-project-archiving-fix.diff
--- 16.12.1-1/debian/patches/11-project-archiving-fix.diff      1970-01-01 
01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/11-project-archiving-fix.diff      2017-02-07 
13:57:52.262304081 +0100
@@ -0,0 +1,99 @@
+commit 018de768588be0f90729f5bc2c673036ae057765
+Author: Jean-Baptiste Mardelle <j...@kdenlive.org>
+Date:   Mon Feb 6 23:42:09 2017 +0100
+
+    Project archiving: fix color clips incorrectly detected and warn before 
overwriting project file
+
+diff --git a/src/project/dialogs/archivewidget.cpp 
b/src/project/dialogs/archivewidget.cpp
+index c443f22..bf18858 100644
+--- a/src/project/dialogs/archivewidget.cpp
++++ b/src/project/dialogs/archivewidget.cpp
+@@ -91,12 +91,12 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, 
const QDomDocument &doc
+     lumas->setIcon(0, QIcon::fromTheme(QStringLiteral("image-x-generic")));
+     lumas->setData(0, Qt::UserRole, "lumas");
+     lumas->setExpanded(false);
+-
++
+     QTreeWidgetItem *proxies = new QTreeWidgetItem(files_list, QStringList() 
<< i18n("Proxy clips"));
+     proxies->setIcon(0, QIcon::fromTheme(QStringLiteral("video-x-generic")));
+     proxies->setData(0, Qt::UserRole, "proxy");
+     proxies->setExpanded(false);
+-
++
+     // process all files
+     QStringList allFonts;
+     QList <QUrl> fileUrls;
+@@ -116,6 +116,9 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, 
const QDomDocument &doc
+         ClipController *clip = list.at(i);
+         ClipType t = clip->clipType();
+         QString id = clip->clipId();
++        if (t == Color) {
++            continue;
++        }
+         if (t == SlideShow) {
+             //TODO: Slideshow files
+             slideUrls.insert(id, clip->clipUrl());
+@@ -151,7 +154,7 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, 
const QDomDocument &doc
+     generateItems(playlists, playlistUrls);
+     generateItems(others, otherUrls);
+     generateItems(proxies, proxyUrls);
+-
++
+     allFonts.removeDuplicates();
+
+     m_infoMessage = new KMessageWidget(this);
+@@ -160,7 +163,7 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, 
const QDomDocument &doc
+     m_infoMessage->setCloseButtonVisible(false);
+     m_infoMessage->setWordWrap(true);
+     m_infoMessage->hide();
+-
++
+         // missing clips, warn user
+     if (m_missingClips > 0) {
+         QString infoText = i18np("You have %1 missing clip in your project.", 
"You have %1 missing clips in your project.", m_missingClips);
+@@ -197,7 +200,7 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, 
const QDomDocument &doc
+     buttonBox->button(QDialogButtonBox::Apply)->setText(i18n("Archive"));
+     connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), 
this, SLOT(slotStartArchiving()));
+     buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
+-
++
+     slotCheckSpace();
+ }
+
+@@ -223,7 +226,7 @@ ArchiveWidget::ArchiveWidget(const QUrl &url, QWidget * 
parent):
+     connect(m_progressTimer, SIGNAL(timeout()), this, 
SLOT(slotExtractProgress()));
+     connect(this, SIGNAL(extractingFinished()), this, 
SLOT(slotExtractingFinished()));
+     connect(this, SIGNAL(showMessage(QString,QString)), this, 
SLOT(slotDisplayMessage(QString,QString)));
+-
++
+     compressed_archive->setHidden(true);
+     proxy_only->setHidden(true);
+     project_files->setHidden(true);
+@@ -368,7 +371,7 @@ void ArchiveWidget::generateItems(QTreeWidgetItem 
*parentItem, const QStringList
+                 item->setData(0, Qt::UserRole + 1, slideImages);
+                 item->setData(0, Qt::UserRole + 3, totalSize);
+                 m_requestedSize += totalSize;
+-            }
++            }
+         }
+         else if (filesList.contains(fileName)) {
+             // we have 2 files with same name
+@@ -665,7 +668,7 @@ void ArchiveWidget::slotArchivingFinished(KJob *job, bool 
finished)
+         for (int i = 0; i < files_list->topLevelItemCount(); ++i) {
+             files_list->topLevelItem(i)->setDisabled(false);
+             for (int j = 0; j < files_list->topLevelItem(i)->childCount(); 
++j)
+-                files_list->topLevelItem(i)->child(j)->setDisabled(false);
++                files_list->topLevelItem(i)->child(j)->setDisabled(false);
+         }
+     }
+ }
+@@ -795,6 +798,9 @@ bool ArchiveWidget::processProjectFile()
+
+     QString path = archive_url->url().toLocalFile() + QDir::separator() + 
m_name + ".kdenlive";
+     QFile file(path);
++    if (file.exists() && KMessageBox::warningYesNo(this, i18n("Output file 
already exists. Do you want to overwrite it?")) != KMessageBox::Yes) {
++        return false;
++    }
+     if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
+         qWarning() << "//////  ERROR writing to file: " << path;
+         KMessageBox::error(this, i18n("Cannot write to file %1", path));
diff -Naur '--exclude=.svn' 16.12.1-1/debian/patches/series 
16.12.1-3/debian/patches/series
--- 16.12.1-1/debian/patches/series     1970-01-01 01:00:00.000000000 +0100
+++ 16.12.1-3/debian/patches/series     2017-02-07 13:57:52.266304058 +0100
@@ -0,0 +1,11 @@
+01-nvidia-crash-375094.diff
+02-nvidia-crash-movit-1.diff
+03-frame-extract-remember-folder.diff
+04-playlist-clip-expand.diff
+05-monitor-length-375163.diff
+06-playaction-not-pausing.diff
+07-nvidia-crash-movit-2.diff
+08-title-clip-select-twice.diff
+09-aspect-transparency-issues.diff
+10-crash-razor-multiple-clips.diff
+11-project-archiving-fix.diff



unblock kdenlive/16.12.1-3

-- System Information:
Debian Release: 8.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Reply via email to