运行后,首先报的错需要改-fno-objc-arc编译后出现的新的错。
需要将 CustomVideoPlayer.mm _lastFrameTimestamp = _curFrameTimestamp; curTex = CMVideoSampling_SampleBuffer(&_videoSampling, _cmSampleBuffer, (int)_videoSize.width, (int)_video
改成
_lastFrameTimestamp = _curFrameTimestamp; size_t w, h; w =(int)_videoSize.width; h =(int)_videoSize.height; curTex = CMVideoSampling_SampleBuffer(&_videoSampling, _cmSampleBuffer, &w, &h);
还有将 CustomVideoPlayer.mm中的 AVPlayerStatus status = [[change objectForKey:NSKeyValueChangeNewKey] integerValue]; 改成 AVPlayerStatus status = (AVPlayerStatus)[[change objectForKey:NSKeyValueChangeNewKey] integerValue];