avcodec/videotoolboxenc: fix encoding frame crash on iOS 11