Skip to content

Commit f12f8d9

Browse files
hiroshihoriecloudwebrtc
authored andcommitted
Fix memory leak when creating audio CMSampleBuffer #86
1 parent d0c4e2b commit f12f8d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sdk/objc/api/peerconnection/RTCAudioTrack.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ void OnData(const void *audio_data,
151151
0,
152152
NULL,
153153
&buffer);
154+
// format is no longer required
155+
CFRelease(format);
156+
154157
if (status != 0) {
155158
NSLog(@"RTCAudioTrack: Failed to allocate sample buffer");
156159
return;

0 commit comments

Comments
 (0)