From e378ec8e4ff0a427ae2e52ca30b4fe863c7b4a51 Mon Sep 17 00:00:00 2001 From: Palana Date: Mon, 14 Apr 2014 22:35:45 +0200 Subject: [PATCH] Properly bridge CF object so ARC can deal with it --- test/test-input/test-desktop.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test-input/test-desktop.m b/test/test-input/test-desktop.m index 7c95a1845..c71d454dd 100644 --- a/test/test-input/test-desktop.m +++ b/test/test-input/test-desktop.m @@ -91,10 +91,12 @@ static bool init_display_stream(struct display_capture *dc) NSNumber *screen_num = screen.deviceDescription[@"NSScreenNumber"]; CGDirectDisplayID disp_id = (CGDirectDisplayID)screen_num.pointerValue; + NSDictionary *rect_dict = CFBridgingRelease( + CGRectCreateDictionaryRepresentation( + CGRectMake(0, 0, dc->width, dc->height))); + NSDictionary *dict = @{ - (__bridge NSString*)kCGDisplayStreamSourceRect: - (__bridge NSDictionary*)CGRectCreateDictionaryRepresentation( - CGRectMake(0, 0, dc->width, dc->height)), + (__bridge NSString*)kCGDisplayStreamSourceRect: rect_dict, (__bridge NSString*)kCGDisplayStreamQueueDepth: @5 };