Commit ea356ac7 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix crash in audio thumbs with reverse speed clip

parent 09999a97
......@@ -175,12 +175,13 @@ public:
int lastIdx = -1;
for (i = 0; i <= width(); i += increment) {
int idx = m_inPoint + ceil(i * indicesPrPixel);
if (idx + channel >= m_audioLevels.length()) break;
if (lastIdx == idx) {
continue;
}
lastIdx = idx;
level = m_audioLevels.at(idx + channel) * channelHeight / 256;
idx += channel;
if (idx >= m_audioLevels.length() || idx < 0) break;
level = m_audioLevels.at(idx) * channelHeight / 256;
channelPaths[channel].lineTo(i, y - level);
}
if (m_firstChunk && m_channels > 1 && m_channels < 7) {
......
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