Bug 183004 - [GStreamer] Rewrite purgeInvalid*Tracks methods
Summary: [GStreamer] Rewrite purgeInvalid*Tracks methods
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-21 08:37 PST by Philippe Normand
Modified: 2018-02-21 09:02 PST (History)
2 users (show)

See Also:


Attachments
Patch (3.34 KB, patch)
2018-02-21 08:40 PST, Philippe Normand
cgarcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>