iPhone 相册取出视频宽高分辨率是相反的 解决方案

AVAsset *asset = [AVAsset assetWithURL:url];
    NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];
    AVAssetTrack *videoTrack = tracks[0];
    CGSize videoSize = CGSizeApplyAffineTransform(videoTrack.naturalSize, videoTrack.preferredTransform);
    videoSize = CGSizeMake(fabs(videoSize.width), fabs(videoSize.height));

 

posted @ 2019-05-06 19:15  ZhangShengjie  阅读(680)  评论(0编辑  收藏  举报