Kaynağa Gözat

VLCKit: fix a leak.

Pierre d'Herbemont 15 yıl önce
ebeveyn
işleme
b2dfc69ce9
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5 2
      Sources/VLCStreamOutput.m

+ 5 - 2
Sources/VLCStreamOutput.m

@@ -44,17 +44,20 @@
 }
 + (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