Bug 217818

Summary: sdpFmtLine should be missing from RTCRtpCodecCapability instead of being an empty string
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description youenn fablet 2020-10-16 05:43:43 PDT
sdpFmtLine should be missing from RTCRtpCodecCapability instead of being an empty string
Comment 1 youenn fablet 2020-10-16 05:44:15 PDT
This makes https://webrtc.github.io/samples/src/content/peerconnection/change-codecs/ failing
Comment 2 youenn fablet 2020-10-16 05:45:49 PDT
Created attachment 411561 [details]
Patch
Comment 3 EWS 2020-10-16 08:38:34 PDT
Committed r268592: <https://trac.webkit.org/changeset/268592>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411561 [details].
Comment 4 Radar WebKit Bug Importer 2020-10-16 08:39:19 PDT
<rdar://problem/70379088>
Comment 5 Darin Adler 2020-10-16 09:31:48 PDT
Comment on attachment 411561 [details]
Patch

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

> Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:415
> +            sdpFmtpLine = sdpFmtpLineBuilder.toString();

In future, for cases like this I think we might want to add a nullIfEmpty function that takes a String&& and returns a String. Seems a shame to add a local variable just for this transformation. Although that "llIf" sequence makes the function name ugly.