Bug 216478

Summary: image.decode() promise does not resolve or reject on some <img src=mp4>
Product: WebKit Reporter: Colin Bendell <colin>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, jer.noble, sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Colin Bendell 2020-09-14 05:52:54 PDT
image.decode() promise does not resolve nor reject on some resources. Valid <img src=mp4> with hvc1 encoded payloads no longer resolve or reject in latest macOS, iOS betas and Tech Preview (regression). This might be related to bug 216088. Additionally, <img src=mp4> with av1 byte streams also do not resolve nor reject but this is pre-existing in all versions of Safari.


const img = new Image();
img.src = "hvc1.mp4";
document.body.appendChild(img);

// will not return
await img.decode();

You can see this tested here: https://colinbendell.github.io/webperf/img-decode-promise/

(NB: the above wpt test may yield some false-negatives due to github latencies and the aggressive timeouts)
Comment 1 Alexey Proskuryakov 2020-09-14 18:42:23 PDT
Not sure if this is actionable with bug 216088 fixed. I see one failure on this test, but it's the same as in shipping Safari, and Chrome has more failures.

Do you have a test that passes in shipping Safari, and fails with a trunk WebKit build?
Comment 2 Colin Bendell 2020-09-15 05:20:21 PDT
The image.decode() failure for <img src=av1.mp4> does pre-exist. While that part is not a regression is a bug. Any invalid or unsupported mp4s will fail to Promise.reject()

The other image.decode() failures on valid/supported mp4 containers appears to be resolved.

Should I open a new bug? Or rename this one?
Comment 3 Alexey Proskuryakov 2020-09-15 18:09:34 PDT
Thank you for the confirmation, removed REGRESSION from the title.
Comment 4 Radar WebKit Bug Importer 2020-09-15 18:09:43 PDT
<rdar://problem/68954377>