LibWeb: Don't try to restart the media fetching process after an error

All errors specify that the resource selection algorithm should
terminate, so let's not continue trying to fetch data.
This commit is contained in:
Zaggy1024 2026-02-25 18:23:56 -06:00 committed by Gregory Bertilson
parent b84473ff1d
commit fa7f1792bc

View file

@ -1236,6 +1236,9 @@ Optional<String> HTMLMediaElement::verify_response_or_get_failure_reason(GC::Ref
void HTMLMediaElement::restart_fetch_at_offset(FetchData& fetch_data, u64 offset)
{
if (m_error)
return;
if (!fetch_data.accepts_byte_ranges)
return;
cancel_the_fetching_process();