[vlc-commits] [Git][videolan/vlc][master] macos: dispatch media source reloads to the main queue
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Aug 14 11:21:20 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
fbf2e13f by Serhii Bykov at 2026-08-14T10:25:28+00:00
macos: dispatch media source reloads to the main queue
- - - - -
1 changed file:
- modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m
Changes:
=====================================
modules/gui/macosx/library/media-source/VLCMediaSourceBaseDataSource.m
=====================================
@@ -719,25 +719,33 @@ referenceSizeForHeaderInSection:(NSInteger)section
- (void)mediaSourceChildrenReset:(NSNotification *)aNotification
{
msg_Dbg(getIntf(), "Reset nodes: %s", [[aNotification.object description] UTF8String]);
- [self reloadDataForNotification:aNotification];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [self reloadDataForNotification:aNotification];
+ });
}
- (void)mediaSourceChildrenAdded:(NSNotification *)aNotification
{
msg_Dbg(getIntf(), "Received new nodes: %s", [[aNotification.object description] UTF8String]);
- [self reloadDataForNotification:aNotification];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [self reloadDataForNotification:aNotification];
+ });
}
- (void)mediaSourceChildrenRemoved:(NSNotification *)aNotification
{
msg_Dbg(getIntf(), "Removed nodes: %s", [[aNotification.object description] UTF8String]);
- [self reloadDataForNotification:aNotification];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [self reloadDataForNotification:aNotification];
+ });
}
- (void)mediaSourcePreparingEnded:(NSNotification *)aNotification
{
msg_Dbg(getIntf(), "Preparsing ended: %s", [[aNotification.object description] UTF8String]);
- [self reloadDataForNotification:aNotification];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [self reloadDataForNotification:aNotification];
+ });
}
- (void)reloadDataForNotification:(NSNotification *)aNotification
@@ -750,6 +758,7 @@ referenceSizeForHeaderInSection:(NSInteger)section
_lanDeviceSnapshot = [self snapshotByUpdatingSource:source];
}
}
+
[self reloadData];
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fbf2e13f58a8e75bc987c502041f3772d896bd6a
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fbf2e13f58a8e75bc987c502041f3772d896bd6a
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list