Commit 421bbe0d authored by Sébastien Gonzalve's avatar Sébastien Gonzalve Committed by Arjan Spieard

Update texture only when a new frame was read.

The previous code was working but uselessly updating the texture with
the same data it already had.

This patch remove this useless update.
parent ab4bfbeb
......@@ -91,10 +91,7 @@ void Video::prepare(double time) {
// shift video timestamp if gap is declared in song config
time += m_videoGap;
// Time to switch frame?
tryPop(m_videoFrame, time);
if (!m_videoFrame.buf.empty()) {
if (tryPop(m_videoFrame, time) && !m_videoFrame.buf.empty()) {
m_textureTime = m_videoFrame.timestamp;
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