| Summary: | [GStreamer][MediaStream] Remove orphaned tracks in updateTracks() | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alicia Boya García <aboya> | ||||||
| Component: | WebKitGTK | Assignee: | Alicia Boya García <aboya> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bugs-noreply, calvaris, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, jer.noble, menard, philipj, pnormand, sergio, vjaquez | ||||||
| Priority: | P2 | ||||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=211946 | ||||||||
| Attachments: |
|
||||||||
|
Description
Alicia Boya García
2020-05-16 03:01:25 PDT
Created attachment 399548 [details]
Patch
Created attachment 399555 [details]
Patch
Comment on attachment 399555 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399555&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1512 > +template<typename K, typename V> > +HashSet<K> hashSetFromHashMapKeys(const HashMap<K, V>& hashMap) > +{ > + HashSet<K> keys; > + for (auto& key : hashMap.keys()) > + keys.add(key); > + return keys; > +} Would this be worth moving to HashMap as a new method? Comment on attachment 399555 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399555&action=review >> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1512 >> +} > > Would this be worth moving to HashMap as a new method? I don't know, all HashMap methods are pretty basic, so maybe someone would oppose this in WTF, or maybe a function already exists and I just didn't find it. I wanted a self-contained fix that didn't need a potentially stalling WTF review, so this was a reasonable solution. I've asked in the WebKit slack, if it turns out there was an existing function or there wasn't but people really want it in WTF another patch can be made that moves it there. For now I'm using this. Committed r261803: <https://trac.webkit.org/changeset/261803> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399555 [details]. |