Assign frame image to the correct frame (including offset).

This commit is contained in:
Bartosz Taudul 2019-06-07 20:13:08 +02:00
parent 784c4da53a
commit fc5a8f7e3a

View File

@ -2954,7 +2954,12 @@ void Worker::ProcessFrameImage( const QueueFrameImage& ev )
const auto idx = m_data.frameImage.size();
m_data.frameImage.push_back( fi );
m_data.framesBase->frames.back().frameImage = idx;
auto& frames = m_data.framesBase->frames;
const auto fidx = (int64_t)frames.size() - 1 - ev.offset;
assert( fidx >= 0 );
assert( frames[fidx].frameImage == -1 );
frames[fidx].frameImage = idx;
m_pendingFrameImageData.erase( it );
}