Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm

Issue 3004013002: Fix memory leak in VideoToolbox encoder. (Closed)
Patch Set: Code review Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm b/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
index 44983beb6a8e09dd8ec18241e356e0063ed84c5f..a410e273cb602da06c3732dc658b88c92845b31f 100644
--- a/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
+++ b/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
@@ -664,10 +664,10 @@ CFStringRef ExtractProfile(const cricket::VideoCodec &codec) {
std::unique_ptr<rtc::Buffer> buffer(new rtc::Buffer());
RTCRtpFragmentationHeader *header;
{
- webrtc::RTPFragmentationHeader *header_cpp;
+ std::unique_ptr<webrtc::RTPFragmentationHeader> header_cpp;
bool result =
H264CMSampleBufferToAnnexBBuffer(sampleBuffer, isKeyframe, buffer.get(), &header_cpp);
- header = [[RTCRtpFragmentationHeader alloc] initWithNativeFragmentationHeader:header_cpp];
+ header = [[RTCRtpFragmentationHeader alloc] initWithNativeFragmentationHeader:header_cpp.get()];
if (!result) {
return;
}
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698