Crash on videos without sound!
fixed:
AVAsset *anAsset = [AVAsset assetWithURL:_dictInfo[UIImagePickerControllerMediaURL]];
AVAssetTrack *assetTrack = [[anAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
_movieFile = [[GPUImageMovie alloc] initWithAsset:anAsset];
_movieWriter = [[GPUImageMovieWriter alloc] initWithMovieURL:_URLInputVideoFile size:assetTrack.naturalSize];
if ([[anAsset tracksWithMediaType:AVMediaTypeAudio] count] > 0){
_movieFile.audioEncodingTarget = _movieWriter;
} else {//no audio
_movieFile.audioEncodingTarget = nil;
}
https://github.com/BradLarson/GPUImage/issues/1276#issuecomment-39695145
如果设置为nil,录制的视频将会没有声音。