summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-05-04 08:24:54 +0200
committerDamiano Galassi <[email protected]>2016-05-04 08:24:54 +0200
commit6ae6fbcfd10b36f635e27c8f1f3dff6f9deed2a1 (patch)
tree3f2ebab31bde4e338c61b191c57f746feab9f797
parent9c4d6ce13e2ee3a17264ecd01ade6707db7942bd (diff)
MacGui: fix build on 10.10 sdk.
-rw-r--r--macosx/HBAVPlayer.m2
-rw-r--r--macosx/HBPlayerHUDController.m13
-rw-r--r--macosx/HBQTKitPlayer.m4
3 files changed, 15 insertions, 4 deletions
diff --git a/macosx/HBAVPlayer.m b/macosx/HBAVPlayer.m
index ef72734c2..748aa39f1 100644
--- a/macosx/HBAVPlayer.m
+++ b/macosx/HBAVPlayer.m
@@ -17,7 +17,7 @@ typedef void (^HBPlayableObverser)(void);
@interface HBAVPlayerRateObserver : NSObject
-@property (nonatomic) HBRateObverser block;
+@property (nonatomic, copy) HBRateObverser block;
- (void)postNotification;
diff --git a/macosx/HBPlayerHUDController.m b/macosx/HBPlayerHUDController.m
index 03eed5a84..ebafc95c1 100644
--- a/macosx/HBPlayerHUDController.m
+++ b/macosx/HBPlayerHUDController.m
@@ -61,6 +61,8 @@
{
[self.player removeRateObserver:self.rateObserver];
[self.player removeTimeObserver:self.periodicObserver];
+ self.rateObserver = nil;
+ self.periodicObserver = nil;
[self _clearTracksMenu];
}
@@ -100,7 +102,16 @@
- (void)dealloc
{
- // Remove observers
+ if (_rateObserver)
+ {
+ [_player removeRateObserver:_rateObserver];
+ _rateObserver = nil;
+ }
+ if (_periodicObserver)
+ {
+ [_player removeTimeObserver:_periodicObserver];
+ _periodicObserver = nil;
+ }
}
#pragma mark - Audio and subtitles selection menu
diff --git a/macosx/HBQTKitPlayer.m b/macosx/HBQTKitPlayer.m
index 012edc01b..b0b608e3a 100644
--- a/macosx/HBQTKitPlayer.m
+++ b/macosx/HBQTKitPlayer.m
@@ -19,7 +19,7 @@ typedef void (^HBPlayableObverser)(void);
@interface HBQTKitPlayerPeriodicObserver : NSObject
-@property (nonatomic) HBPeriodicObverser block;
+@property (nonatomic, copy) HBPeriodicObverser block;
- (void)postNotification:(NSTimeInterval)time;
@@ -36,7 +36,7 @@ typedef void (^HBPlayableObverser)(void);
@interface HBQTKitPlayerRateObserver : NSObject
-@property (nonatomic) HBRateObverser block;
+@property (nonatomic, copy) HBRateObverser block;
- (void)postNotification;