Skip to content
Snippets Groups Projects
Commit 305be73f authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

[ #45992 ] Remove a potential double-free issue, simplify the video rendering process

parent 68a9abcb
No related branches found
No related tags found
No related merge requests found
......@@ -319,9 +319,10 @@ bool VideoRenderer::isRendering()
}
///Return the current framerate
QByteArray VideoRenderer::currentFrame()
const QByteArray& VideoRenderer::currentFrame()
{
return m_Frame[m_FrameIdx];
static QByteArray empty;
return m_isRendering?m_Frame[m_FrameIdx]:empty;
}
///Return the current resolution
......
......@@ -52,7 +52,7 @@ class LIB_EXPORT VideoRenderer : public QObject {
//Getters
const char* rawData () ;
bool isRendering () ;
QByteArray currentFrame () ;
const QByteArray& currentFrame () ;
Resolution activeResolution() ;
QMutex* mutex () ;
int fps () const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment