Skip to content

Commit

Permalink
Fix memory leak when creating audio CMSampleBuffer #86
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshihorie authored and cloudwebrtc committed Sep 14, 2023
1 parent d0c4e2b commit f12f8d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/objc/api/peerconnection/RTCAudioTrack.mm
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ void OnData(const void *audio_data,
0,
NULL,
&buffer);
// format is no longer required
CFRelease(format);

if (status != 0) {
NSLog(@"RTCAudioTrack: Failed to allocate sample buffer");
return;
Expand Down

0 comments on commit f12f8d9

Please sign in to comment.