Bug 183004

Summary: [GStreamer] Rewrite purgeInvalid*Tracks methods
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: PlatformAssignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch cgarcia: review+

Description Philippe Normand 2018-02-21 08:37:21 PST
Removing items from a hashmap while iterating is no good.
Comment 1 Philippe Normand 2018-02-21 08:40:02 PST
Created attachment 334382 [details]
Patch
Comment 2 Carlos Garcia Campos 2018-02-21 08:46:10 PST
Comment on attachment 334382 [details]
Patch

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

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1458
> +    m_audioTracks.removeIf([&](auto& keyAndValue) {

I prefer to explicitly capture validTrackIds& only
Comment 3 Philippe Normand 2018-02-21 09:01:16 PST
Committed r228875: <https://trac.webkit.org/changeset/228875>
Comment 4 Radar WebKit Bug Importer 2018-02-21 09:02:38 PST
<rdar://problem/37747568>