diff options
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBAVPlayer.m | 2 | ||||
-rw-r--r-- | macosx/HBPlayerHUDController.m | 13 | ||||
-rw-r--r-- | macosx/HBQTKitPlayer.m | 4 |
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; |