Commit e6cc7b7f authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

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

parent d4ccc8f6
......@@ -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 );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment