|
|
|
@ -2182,8 +2182,8 @@ typedef enum : NSUInteger {
|
|
|
|
|
|
|
|
|
|
NSURL *referenceURL = [info valueForKey:UIImagePickerControllerReferenceURL];
|
|
|
|
|
if (!referenceURL) {
|
|
|
|
|
DDLogError(@"Could not retrieve reference URL for picked asset");
|
|
|
|
|
OWSAssert(0);
|
|
|
|
|
DDLogVerbose(@"Could not retrieve reference URL for picked asset");
|
|
|
|
|
[self imagePickerController:picker didFinishPickingMediaWithInfo:info filename:nil];
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2357,10 +2357,10 @@ typedef enum : NSUInteger {
|
|
|
|
|
exportSession.outputURL = compressedVideoUrl;
|
|
|
|
|
[exportSession exportAsynchronouslyWithCompletionHandler:^{
|
|
|
|
|
NSData *videoData = [NSData dataWithContentsOfURL:compressedVideoUrl];
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
SignalAttachment *attachment =
|
|
|
|
|
[SignalAttachment videoAttachmentWithData:videoData dataUTI:(NSString *)kUTTypeMPEG4 filename:filename];
|
|
|
|
|
if (!attachment ||
|
|
|
|
|
[attachment hasError]) {
|
|
|
|
|
if (!attachment || [attachment hasError]) {
|
|
|
|
|
DDLogWarn(@"%@ %s Invalid attachment: %@.",
|
|
|
|
|
self.tag,
|
|
|
|
|
__PRETTY_FUNCTION__,
|
|
|
|
@ -2375,6 +2375,7 @@ typedef enum : NSUInteger {
|
|
|
|
|
if (error) {
|
|
|
|
|
DDLogWarn(@"Failed to remove cached video file: %@", error.debugDescription);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|