Bug 167621

Summary: Fix CMSampleBuffer leak in MediaSampleAVFObjC::createNonDisplayingCopy().
Product: WebKit Reporter: Andreas Kling <kling>
Component: MediaAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2017-01-30 17:34:46 PST
Seen on leaks bot, there's a missing adoptCF waiting to happen.
Comment 1 Andreas Kling 2017-01-30 17:35:18 PST
Created attachment 300168 [details]
Patch
Comment 2 Andy Estes 2017-01-30 17:48:34 PST
Comment on attachment 300168 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=300168&action=review

> Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:232
> -    return MediaSampleAVFObjC::create(newSampleBuffer, m_id);
> +    return MediaSampleAVFObjC::create(adoptCF(newSampleBuffer).get(), m_id);

This is fine, but we could avoid some retain count churn by changing MediaSampleAVFObjc::create() to take a RetainPtr&&
Comment 3 WebKit Commit Bot 2017-01-30 18:13:30 PST
Comment on attachment 300168 [details]
Patch

Clearing flags on attachment: 300168

Committed r211399: <http://trac.webkit.org/changeset/211399>
Comment 4 WebKit Commit Bot 2017-01-30 18:13:33 PST
All reviewed patches have been landed.  Closing bug.