]> git.sesse.net Git - vlc/commitdiff
VLCKit: fix a leak.
authorPierre d'Herbemont <pdherbemont@free.fr>
Thu, 3 Dec 2009 11:12:07 +0000 (12:12 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sat, 5 Dec 2009 15:42:09 +0000 (16:42 +0100)
projects/macosx/framework/Sources/VLCStreamOutput.m

index d99c1c21870d7604ac4f5da1c0cdd2a76a2cb91e..eec769a13d4c400088819d5eb069ffe833e8a2a4 100644 (file)
 }
 + (id)rtpBroadcastStreamOutputWithSAPAnnounce:(NSString *)announceName
 {
-    return [self streamOutputWithOptionDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
+    NSString *name = [announceName copy];
+    id output = [self streamOutputWithOptionDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
                                             [NSDictionary dictionaryWithObjectsAndKeys:
                                                 @"ts", @"muxer",
                                                 @"file", @"access",
                                                 @"sap", @"sdp",
-                                                [announceName copy], @"name",
+                                                name, @"name",
                                                 @"239.255.1.1", @"destination", nil
                                             ], @"rtpOptions",
                                             nil
                                             ]
                                         ];
+    [name release];
+    return output;
 }
 
 + (id)rtpBroadcastStreamOutput