Bug 189835 - [WPE][GTK][WebRTC] Fix leaks in the libwebrtc Decoder and Encoder
Summary: [WPE][GTK][WebRTC] Fix leaks in the libwebrtc Decoder and Encoder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thibault Saunier
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-21 08:52 PDT by Thibault Saunier
Modified: 2018-09-24 04:18 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.28 KB, patch)
2018-09-21 08:53 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff
Patch (12.30 KB, patch)
2018-09-21 09:48 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff
Patch (12.58 KB, patch)
2018-09-21 11:46 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thibault Saunier 2018-09-21 08:52:13 PDT
[WPE][GTK][WebRTC] Fix leaks in the libwebrtc Decoder and Encoder
Comment 1 Thibault Saunier 2018-09-21 08:53:19 PDT
Created attachment 350369 [details]
Patch
Comment 2 EWS Watchlist 2018-09-21 08:55:43 PDT
Attachment 350369 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Thibault Saunier 2018-09-21 09:48:28 PDT
Created attachment 350374 [details]
Patch
Comment 4 Philippe Normand 2018-09-21 10:57:41 PDT
Comment on attachment 350374 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +          startegy as other libwebrtc encoder implementation).

tyop: startegy ;)

> Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:84
>          SetRestrictionCaps(caps);

Would it be better to understand if SetRestrictionCaps() was taking a GRefPtr instead of a raw pointer?

> Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:110
> +        m_encodedFrame._size = codecSettings->width * codecSettings->height * 3;

3 is for the number of planes I assume? Is this info stored in the codec settings maybe?
Comment 5 Thibault Saunier 2018-09-21 11:44:37 PDT
(In reply to Philippe Normand from comment #4)
> Comment on attachment 350374 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=350374&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +          startegy as other libwebrtc encoder implementation).
> 
> tyop: startegy ;)

Fixed.

> > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:84
> >          SetRestrictionCaps(caps);
> 
> Would it be better to understand if SetRestrictionCaps() was taking a
> GRefPtr instead of a raw pointer?

Fixed.

> > Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:110
> > +        m_encodedFrame._size = codecSettings->width * codecSettings->height * 3;
> 
> 3 is for the number of planes I assume? Is this info stored in the codec
> settings maybe?

It doesn't seem to contain any info about that, I just reused what they did for the openh264 encoder.
Comment 6 Thibault Saunier 2018-09-21 11:46:43 PDT
Created attachment 350395 [details]
Patch
Comment 7 WebKit Commit Bot 2018-09-24 04:17:06 PDT
Comment on attachment 350395 [details]
Patch

Clearing flags on attachment: 350395

Committed r236397: <https://trac.webkit.org/changeset/236397>
Comment 8 WebKit Commit Bot 2018-09-24 04:17:07 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-09-24 04:18:26 PDT
<rdar://problem/44723922>