mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Disconnect all sinks when forgetting HTMLMediaElement tracks
This prevents a crash when playing videos on Newgrounds.
This commit is contained in:
parent
9f44fcbded
commit
c75f134eec
Notes:
github-actions[bot]
2025-10-28 00:32:16 +00:00
Author: https://github.com/Zaggy1024
Commit: c75f134eec
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6410
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/gmta ✅
2 changed files with 4 additions and 0 deletions
|
|
@ -52,6 +52,8 @@ void VideoTrackList::add_track(Badge<HTMLMediaElement>, GC::Ref<VideoTrack> vide
|
|||
|
||||
void VideoTrackList::remove_all_tracks(Badge<HTMLMediaElement>)
|
||||
{
|
||||
for (auto& video_track : m_video_tracks)
|
||||
video_track->set_selected(false);
|
||||
m_video_tracks.clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue