[vlc-commits] [Git][videolan/vlc][master] macosx: Avoid race condition on set/get of self.collectionArray in...
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Nov 28 05:17:28 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
e7f8c4a3 by Claudio Cambra at 2025-11-28T04:07:25+00:00
macosx: Avoid race condition on set/get of self.collectionArray in VLCLibraryHomeViewVideoContainerViewDataSource
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/library/home-library/VLCLibraryHomeViewVideoContainerViewDataSource.m
Changes:
=====================================
modules/gui/macosx/library/home-library/VLCLibraryHomeViewVideoContainerViewDataSource.m
=====================================
@@ -190,18 +190,20 @@ NSString * const VLCLibraryVideoCollectionViewDataSourceDisplayedCollectionChang
}
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
+ NSArray *newCollectionArray = nil;
switch(self->_groupDescriptor.group) {
case VLCMediaLibraryParentGroupTypeVideoLibrary:
- self.collectionArray = self->_libraryModel.listOfVideoMedia;
+ newCollectionArray = self->_libraryModel.listOfVideoMedia;
break;
case VLCMediaLibraryParentGroupTypeRecentVideos:
- self.collectionArray = self->_libraryModel.listOfRecentMedia;
+ newCollectionArray = self->_libraryModel.listOfRecentMedia;
break;
default:
return;
}
dispatch_async(dispatch_get_main_queue(), ^{
+ self.collectionArray = newCollectionArray;
[self.collectionView reloadData];
[self.carouselView reloadData];
[NSNotificationCenter.defaultCenter postNotificationName:VLCLibraryVideoCollectionViewDataSourceDisplayedCollectionChangedNotification
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e7f8c4a35add4d93fb7062324fdb244e91ea9445
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e7f8c4a35add4d93fb7062324fdb244e91ea9445
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