Fixed a stupid iterator issue in VideoFFmpegComponent.

This commit is contained in:
Leon Styhre 2021-05-11 18:06:30 +02:00
parent 84640c0dc5
commit b1521c4c53

View file

@ -267,7 +267,7 @@ void VideoFFmpegComponent::readFrames()
currFrame.height = mVideoFrame->height;
currFrame.frameRGBA.insert(currFrame.frameRGBA.begin(),
&frameRGBA[0][0], &frameRGBA[0][allocatedSize - 1]);
&frameRGBA[0][0], &frameRGBA[0][allocatedSize]);
currFrame.pts = pts;
mVideoFrameQueue.push(currFrame);
@ -485,7 +485,7 @@ void VideoFFmpegComponent::outputFrames()
mOutputPicture.pictureRGBA.insert(mOutputPicture.pictureRGBA.begin(),
mVideoFrameQueue.front().frameRGBA.begin(),
mVideoFrameQueue.front().frameRGBA.begin() +
mVideoFrameQueue.front().frameRGBA.size() - 1);
mVideoFrameQueue.front().frameRGBA.size());
mOutputPicture.width = mVideoFrameQueue.front().width;
mOutputPicture.height = mVideoFrameQueue.front().height;