Fail to encode a GPUVideoImage VideoFrame on Linux
Categories
(Core :: Audio/Video: Web Codecs, defect, P1)
Tracking
()
People
(Reporter: chunmin, Assigned: chunmin)
References
(Blocks 2 open bugs)
Details
Nightly crashes when running the encode test page below.
Step-to-reproduce
- Go to https://chunminchang.github.io/playground/webcodecs/encode-from-video.html
- Click "Start Encoding"
Expected result
get the test result
Actual result
crash
Logs
[Child 82976, Main Thread] WARNING: '!surface', file /home/cm/Work/gecko-dev/dom/canvas/ImageUtils.cpp:133
[Child 82976: Main Thread]: D/WebCodecs VideoFrame 72b8d825ff50 ctor
[Child 82976: Main Thread]: W/WebCodecs Create a VideoFrame with an unrecognized image format
[Child 82976: Main Thread]: D/WebCodecs VideoFrame 72b8d825ff50, start monitoring resource release
[Child 82976: DOM Worker]: D/WebCodecs VideoFrame 72b8da09b0e0 ctor
[Child 82976: DOM Worker]: W/WebCodecs Create a VideoFrame with an unrecognized image format
...
[Child 82976, Main Thread] WARNING: '!surface', file /home/cm/Work/gecko-dev/dom/canvas/ImageUtils.cpp:133
[Child 82976: Main Thread]: D/WebCodecs VideoFrame 72b8d2ffb3a0 ctor
[Child 82976: Main Thread]: W/WebCodecs Create a VideoFrame with an unrecognized image format
[Child 82976: Main Thread]: D/WebCodecs VideoFrame 72b8d2ffb3a0, start monitoring resource release
...
It looks like the format obtained from ImageUtils is Nothing() since the GetAsSourceSurface from the given layers::Image is nullptr, then the crash happens somewhere in the pipeline.
| Assignee | ||
Comment 1•1 year ago
|
||
The crash is caused by calling the PixelFormat() on mFormat whose value Nothing() in VideoFrame::ToString().
The reason why the format is Nothing() (and conversion error later in ConvertToI420) is GPUVideoImage::GetAsSourceSurface() returns nullptr, since RemoteDecoderManagerChild::Readback's SurfaceDescriptor is invalid
| Assignee | ||
Comment 2•1 year ago
•
|
||
(In reply to C.M.Chang[:chunmin] from comment #1)
The crash is caused by calling the
PixelFormat()onmFormatwhose valueNothing()inVideoFrame::ToString().
I am going to fix this first in bug 1923729, and fix the encode failure later
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 3•1 year ago
|
||
I can no longer reproduce this issue, which was likely fixed by another bug.
| Assignee | ||
Updated•1 year ago
|
Description
•