Fix issue when a frame overlaps the input buffer from libuv