Slice buffer before pass it to the framehandler