     fileprivate var renderingEnabled: Bool = true
     fileprivate var clearRenderer = 0
     fileprivate var lastVideoFrame: OTVideoFrame?
+    fileprivate var lastVideoFrameRendered: Bool = true
     fileprivate var displayLinkProxy: DisplayLinkProxy?
     fileprivate var displayLink: CADisplayLink?
     

            frameLock?.unlock()
        }
        frameLock?.lock()
        guard let frame = lastVideoFrame
            else {
                return
        }
        
        renderer?.drawFrame(frame: frame, withViewport: view.frame)
        
        let yPlane: UnsafeMutablePointer<GLubyte>? = frame.planes?.pointer(at: 0)?.assumingMemoryBound(to: GLubyte.self)
        let uPlane: UnsafeMutablePointer<GLubyte>? = frame.planes?.pointer(at: 1)?.assumingMemoryBound(to: GLubyte.self)
        let vPlane: UnsafeMutablePointer<GLubyte>? = frame.planes?.pointer(at: 2)?.assumingMemoryBound(to: GLubyte.self)
        let planeSize = calculatePlaneSize(forFrame: frame)
        yPlane?.deallocate(capacity: planeSize.ySize)
        uPlane?.deallocate(capacity: planeSize.uSize)
        vPlane?.deallocate(capacity: planeSize.vSize)
    }
    
}

            lastVideoFrame?.planes?.addPointer(uPlane)
            lastVideoFrame?.planes?.addPointer(vPlane)
            
            lastVideoFrameRendered = false
            
            fLock.unlock()
            
            if let delegate = delegate {
