Summary: | [GStreamer][WebRTC] Huge memory leak | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Philippe Normand <pnormand> | ||||||
Component: | Platform | Assignee: | Philippe Normand <pnormand> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | calvaris, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, hta, jer.noble, menard, philipj, sergio, tommyw, vjaquez, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Philippe Normand
2021-12-10 02:07:06 PST
There's at least one leak here, https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp#L114 I don't have a fix yet though... (In reply to Philippe Normand from comment #1) > There's at least one leak here, > https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/ > gstreamer/MediaSampleGStreamer.cpp#L114 > > I don't have a fix yet though... That's not the culprit actually... Patch incoming Created attachment 446889 [details]
Patch
Comment on attachment 446889 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446889&action=review > Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp:140 > + const GstClockTime minimumDuration = 1000; // 1 us period at the end. > Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:65 > +rtc::scoped_refptr<webrtc::VideoFrameBuffer> GStreamerVideoFrameLibWebRTC::create(GRefPtr<GstSample> sample) Why did you remove the &&? We should either have const & or && > Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.h:40 > + GStreamerVideoFrameLibWebRTC(GRefPtr<GstSample> sample, GstVideoInfo info) Ditto > Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.h:44 > + static rtc::scoped_refptr<webrtc::VideoFrameBuffer> create(GRefPtr<GstSample>); Ditto. Comment on attachment 446889 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446889&action=review >> Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp:140 >> + const GstClockTime minimumDuration = 1000; // 1 us > > period at the end. Why? This is not a sentence. >> Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:65 >> +rtc::scoped_refptr<webrtc::VideoFrameBuffer> GStreamerVideoFrameLibWebRTC::create(GRefPtr<GstSample> sample) > > Why did you remove the &&? We should either have const & or && && would transfer ownership iiuc? As mentioned in the changelog we can't do that. Maybe a const& though. >> Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.h:40 >> + GStreamerVideoFrameLibWebRTC(GRefPtr<GstSample> sample, GstVideoInfo info) > > Ditto Ditto >> Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.h:44 >> + static rtc::scoped_refptr<webrtc::VideoFrameBuffer> create(GRefPtr<GstSample>); > > Ditto. Ditto!. Comment on attachment 446889 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446889&action=review >>> Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:65 >>> +rtc::scoped_refptr<webrtc::VideoFrameBuffer> GStreamerVideoFrameLibWebRTC::create(GRefPtr<GstSample> sample) >> >> Why did you remove the &&? We should either have const & or && > > && would transfer ownership iiuc? As mentioned in the changelog we can't do that. Maybe a const& though. const & sounds good. Created attachment 447347 [details]
Patch
Committed r287180 (245349@main): <https://commits.webkit.org/245349@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447347 [details]. |