[vlc-commits] [Git][videolan/vlc][master] macosx: Assert correct displaylink init/animation start in playback progress slider cell
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Feb 8 12:38:30 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
3d0e73a0 by Claudio Cambra at 2025-02-08T12:25:37+00:00
macosx: Assert correct displaylink init/animation start in playback progress slider cell
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/views/VLCPlaybackProgressSliderCell.m
Changes:
=====================================
modules/gui/macosx/views/VLCPlaybackProgressSliderCell.m
=====================================
@@ -98,10 +98,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
- (void)initDisplayLink
{
const CVReturn ret = CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink);
- if (ret != kCVReturnSuccess) {
- // TODO: Handle error
- return;
- }
+ NSAssert(ret == kCVReturnSuccess && _displayLink != NULL, @"Could not init displaylink");
CVDisplayLinkSetOutputCallback(_displayLink, DisplayLinkCallback, (__bridge void*) self);
}
@@ -270,9 +267,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
- (void)beginAnimating
{
const CVReturn err = CVDisplayLinkStart(_displayLink);
- if (err != kCVReturnSuccess) {
- // TODO: Handle error
- }
+ NSAssert(err == kCVReturnSuccess, @"Display link animation start should not return error!");
_animationPosition = -(_animationWidth);
self.enabled = NO;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3d0e73a0e9c2e3f7b66f52a159e41233dcb866ba
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3d0e73a0e9c2e3f7b66f52a159e41233dcb866ba
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list