mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
ios: fix crashes in video calls caused by invalid memory usage
This commit is contained in:
parent
ad69acbe7b
commit
211e251f5a
4 changed files with 18 additions and 5 deletions
|
|
@ -70,6 +70,7 @@
|
|||
|
||||
}
|
||||
@property (nonatomic, retain) IBOutlet UIView* dialerView;
|
||||
@property (nonatomic, retain) IBOutlet UIViewController* videoViewController;
|
||||
@property (nonatomic, retain) IBOutlet UITextField* address;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* call;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* hangup;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
|
||||
@synthesize back;
|
||||
@synthesize myTabBarController;
|
||||
@synthesize videoViewController;
|
||||
|
||||
|
||||
//implements keypad behavior
|
||||
|
|
@ -121,7 +122,7 @@
|
|||
[mute initWithOnImage:[UIImage imageNamed:@"mic_muted.png"] offImage:[UIImage imageNamed:@"mic_active.png"] ];
|
||||
[speaker initWithOnImage:[UIImage imageNamed:@"Speaker-32-on.png"] offImage:[UIImage imageNamed:@"Speaker-32-off.png"] ];
|
||||
[erase initWithAddressField:address];
|
||||
mVideoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
|
||||
self.videoViewController = [[VideoViewController alloc] initWithNibName:@"VideoViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
|
||||
}
|
||||
|
|
@ -153,7 +154,7 @@
|
|||
[address resignFirstResponder];
|
||||
[mDisplayName setText:@""]; //display name only relefvant
|
||||
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
@ -170,7 +171,17 @@
|
|||
mIncomingCallActionSheet=nil;
|
||||
}
|
||||
}
|
||||
[self dismissModalViewControllerAnimated:TRUE];//just in case
|
||||
UIViewController* modalVC = self.modalViewController;
|
||||
|
||||
if (modalVC != nil) {
|
||||
// clear previous native window ids
|
||||
if (modalVC == self.videoViewController) {
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc],0);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],0);
|
||||
}
|
||||
|
||||
[self dismissModalViewControllerAnimated:TRUE];//just in case
|
||||
}
|
||||
|
||||
[address setHidden:false];
|
||||
if (username) {
|
||||
|
|
@ -235,7 +246,7 @@
|
|||
}
|
||||
|
||||
-(void) displayVideoCallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName {
|
||||
[self presentModalViewController:mVideoViewController animated:true];
|
||||
[self presentModalViewController:self.videoViewController animated:true];
|
||||
}
|
||||
//status reporting
|
||||
-(void) displayStatus:(NSString*) message {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
}
|
||||
-(void) viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
linphone_core_set_native_video_window_id([LinphoneManager getLc],(unsigned long)mDisplay);
|
||||
linphone_core_set_native_preview_window_id([LinphoneManager getLc],(unsigned long)mPreview);
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 40023c6a4d5062408604135925d908eaa15dfc5b
|
||||
Subproject commit bd7e176640234d606fd4d02ad4f8c99597c940cd
|
||||
Loading…
Add table
Reference in a new issue