File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,10 @@ - (void)playing_change:(NSNotification *)notification {
113
113
114
114
- (void )media_change : (NSNotification *)notification {
115
115
if (!g_media_events) return ;
116
- MRMediaRemoteGetNowPlayingApplicationDisplayName (0 , dispatch_get_main_queue (), ^(CFStringRef name) {
116
+ MRMediaRemoteGetNowPlayingApplicationDisplayName (0 , dispatch_get_main_queue (), ^(CFStringRef name_nr) {
117
+ if (!name_nr) return ;
118
+
119
+ CFStringRef name = CFStringCreateCopy (CFAllocatorGetDefault (), name_nr);
117
120
@autoreleasepool {
118
121
MRMediaRemoteGetNowPlayingInfo (dispatch_get_main_queue (), ^(NSDictionary * dict) {
119
122
@autoreleasepool {
@@ -155,6 +158,8 @@ - (void)media_change:(NSNotification *)notification {
155
158
}
156
159
}
157
160
}
161
+
162
+ CFRelease (name);
158
163
});
159
164
}
160
165
});
You can’t perform that action at this time.
0 commit comments