Use FrameSource's own size in TestMediaDataEncoder GetFrame
Categories
(Core :: Audio/Video, defect, P5)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: chunmin, Assigned: corpus_e, Mentored)
Details
(Keywords: good-first-bug, Whiteboard: [lang=c++])
Attachments
(1 file, 1 external file)
|
4.93 KB,
text/plain
|
Details |
In dom/media/gtest/TestMediaDataEncoder.cpp, the FrameSource test helper is initialized with a size through FrameSource::Init(aSize), which it stores in its mSize member. But FrameSource::GetFrame hardcodes the global kImageSize when building the frame's display size instead of using mSize:
RefPtr<MediaData> frame = VideoData::CreateFromImage(
kImageSize, 0,
...
So a FrameSource created at any size other than kImageSize produces frames that report the wrong display size. For example, mData4K is initialized at kImageSize4K (3840x2160) but its frames still claim a 640x480 display size. Change kImageSize to mSize on that line so the helper reports the size it was actually initialized with.
Code: TestMediaDataEncoder.cpp:139
To verify, the encoder gtests should still pass: ./mach gtest 'MediaDataEncoderTest.*'
Contribution guides: contribution quickref and stack quickref.
Updated•1 month ago
|
Comment 4•26 days ago
|
||
| bugherder | ||
Updated•18 days ago
|
Description
•