[Cocoa] Fix CVPixelBuffer leak
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Dec 2017 00:57:13 +0000 (00:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Dec 2017 00:57:13 +0000 (00:57 +0000)
commit43cdb2b277a7640e7314f452b6a623908901e1ed
tree5c013f1076949b97a340c707120a8faa6f90ec64
parent8a286a09173f13e0d44cb61d0f737f32e32a12b4
[Cocoa] Fix CVPixelBuffer leak
https://bugs.webkit.org/show_bug.cgi?id=180224

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-11-30
Reviewed by Youenn Fablet.

* platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp:
(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame):
Adopt the newly created pixel buffer.

(WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):
Release the format description as soon as we are done with it. Otherwise
we could have bailed before releasing it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp