diff --git a/CHANGES.rst b/CHANGES.rst index 4044be3659..486c751b3c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,7 @@ Changes to be released in next version * VoIP: Do not present ended calls. * More fixes to Main.storyboard layout on iPhone 12 Pro Max (#4527) * Fix crash on Apple Silicon Macs. + * Media Picker: Generate video thumbnails with the correct orientation (#4515). ⚠️ API Changes * diff --git a/Riot/Modules/MediaPicker/MediaPickerViewController.m b/Riot/Modules/MediaPicker/MediaPickerViewController.m index 6b7725a111..d08e6ab172 100644 --- a/Riot/Modules/MediaPicker/MediaPickerViewController.m +++ b/Riot/Modules/MediaPicker/MediaPickerViewController.m @@ -736,6 +736,7 @@ - (void)validateSelectedVideo:(NSURL*)selectedVideoURL responseHandler:(void (^) // create a thumbnail for the first frame AVAsset *asset = [AVAsset assetWithURL:selectedVideoURL]; AVAssetImageGenerator *generator = [AVAssetImageGenerator assetImageGeneratorWithAsset:asset]; + generator.appliesPreferredTrackTransform = YES; CGImageRef thumbnailRef = [generator copyCGImageAtTime:kCMTimeZero actualTime:nil error:nil]; // set thumbnail on validationView