Bug 303985

Summary: [GStreamer][WebRTC] A few uninitialized variables were added in 304213@main
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: MediaAssignee: Philippe Normand <philn>
Status: RESOLVED FIXED    
Severity: Normal CC: philn, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Nikolas Zimmermann
Reported 2025-12-11 02:27:37 PST
In the new code added in 304213@main there are computations like `m_totalAudioEnergy += m_audioLevel * m_audioLevel * duration`, but `m_audioLevel` is only computed if we take the `if (auto audioLevelMeta = gst_buffer_get_audio_level_meta(buffer)) {` branch. Therefore m_audioLevel & co might be uninitialized - same for video tracks. All variables should always be initialized in any case.
Attachments
Philippe Normand
Comment 1 2025-12-11 09:59:38 PST
EWS
Comment 2 2025-12-12 01:01:25 PST
Committed 304348@main (1bf55563fd9c): <https://commits.webkit.org/304348@main> Reviewed commits have been landed. Closing PR #55252 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-12-12 01:02:13 PST
Note You need to log in before you can comment on or make changes to this bug.