FrameBuffer::rotateFrames fixed: incorrect behavior at the end of video.