]> git.sesse.net Git - kdenlive/blobdiff - src/mltdevicecapture.cpp
Switch to rgb24 instead of rbg24a when requesting frames from MLT. Fixes: http:/...
[kdenlive] / src / mltdevicecapture.cpp
index 6a23773d9f3cd06500eb9f60f0a73ae71856440f..629ed5175941dc723e5dfad2f473a29058832dfc 100644 (file)
@@ -252,13 +252,14 @@ void MltDeviceCapture::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_Premultiplied);
-    memcpy(qimage.bits(), image, width * height * 4);
-    emit frameUpdated(qimage.rgbSwapped());
+    QImage qimage(width, height, QImage::Format_RGB888);
+    //QImage qimage(width, height, QImage::Format_ARGB32_Premultiplied);
+    memcpy(qimage.bits(), image, width * height * 3);
+    emit frameUpdated(qimage);
 }
 
 void MltDeviceCapture::showFrame(Mlt::Frame& frame)