]> git.sesse.net Git - kdenlive/blobdiff - src/renderer.cpp
cppcheck fixes, patch by Mikko Rapeli [20/27]
[kdenlive] / src / renderer.cpp
index 66e16ecd695bdc2ffb29ba5aa3dd2c81cea1fa35..14b71cc04802ee92e1f843df3635f36602b34606 100644 (file)
@@ -292,7 +292,7 @@ Mlt::Producer *Render::invalidProducer(const QString &id)
     return clip;
 }
 
-int Render::resetProfile(const QString profileName, bool dropSceneList)
+int Render::resetProfile(const QString &profileName, bool dropSceneList)
 {
     QString scene;
     if (!dropSceneList) scene = sceneList();
@@ -1473,13 +1473,13 @@ const QString & Render::rendererName() const
 
 void Render::emitFrameUpdated(Mlt::Frame& frame)
 {
-    mlt_image_format format = mlt_image_rgb24a;
+    mlt_image_format format = mlt_image_rgb24;
     int width = 0;
     int height = 0;
     const uchar* image = frame.get_image(format, width, height);
-    QImage qimage(width, height, QImage::Format_ARGB32);
-    memcpy(qimage.bits(), image, width * height * 4);
-    emit frameUpdated(qimage.rgbSwapped());
+    QImage qimage(width, height, QImage::Format_RGB888);
+    memcpy(qimage.bits(), image, width * height * 3);
+    emit frameUpdated(qimage);
 }
 
 void Render::emitFrameNumber(double position)