[vlmc-devel] VLCVmemRenderer: Let Qt decide if we need to do a hard copy.

Hugo Beauzée-Luyssen git at videolan.org
Mon Feb 24 20:09:40 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 24 14:29:12 2014 +0200| [e6cc7b7ff9c3356503296857edf403384f5994c4] | committer: Hugo Beauzée-Luyssen

VLCVmemRenderer: Let Qt decide if we need to do a hard copy.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=e6cc7b7ff9c3356503296857edf403384f5994c4
---

 src/Backend/VLC/VLCVmemRenderer.cpp |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/Backend/VLC/VLCVmemRenderer.cpp b/src/Backend/VLC/VLCVmemRenderer.cpp
index cb7dc18..8401d5a 100644
--- a/src/Backend/VLC/VLCVmemRenderer.cpp
+++ b/src/Backend/VLC/VLCVmemRenderer.cpp
@@ -61,10 +61,7 @@ VmemRenderer::waitSnapshot()
     m_snapshotRequired = true;
     if ( m_waitCond.wait( &m_mutex, 3000 ) == false )
         return NULL;
-    // Do not use regular copy ctor, as it is a shallow copy. m_snapshot might
-    // become invalid as soon as we release the mutex, since vmem could be
-    // rendering on it before the renderer is stopped
-    return new QImage( m_snapshot->bits(), (int)m_snapshot->width(), (int)m_snapshot->height(), m_snapshot->format() );
+    return new QImage( *m_snapshot );
 }
 
 void*



More information about the Vlmc-devel mailing list