Closed Bug 1942404 Opened 1 month ago Closed 27 days ago

Failed to play HEVC video with inband config change on MacOS

Categories

(Core :: Audio/Video: Playback, defect, P1)

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

This test case will fail, we need more investigation to know why it can't be played, and whether this issue will affect other videos with inband config changes.

OS: Unspecified → macOS
Summary: Failed to play HEVC video with inband config change → Failed to play HEVC video with inband config change on MacOS

The current implementation of SPSIterator is incorrect; it requires
calling the ++ operator before accessing any SPS. The * operator
should allow access to the SPS immediately after the SPSIterator is created.

memcmp is unreliable due to (1) padding bytes (2) non-POD Members,
so better to compare their members directly.

Depends on D235526

When recreating a decoder, the VideoToolbox decoder requires extradata containing SPS, PPS,
and VPS to successfully initialize a DecompressionSession.

The current implementation replaces the extradata when a different SPS is detected but does
not ensure that all three NALUs (SPS, PPS, and VPS) are present in the new extradata. For
example, in hevc_white_red_frames.mp4, the initial extradata contains all required NALUs,
but the inband extradata only includes an SPS without the PPS or VPS. Using such incomplete
extradata to recreate the decoder will result in a failure to create the DecompressionSession.

To resolve this, we should update only the differing NALUs to ensure all essential information
is retained in the extradata.

Depends on D235527

Depends on D235528

Depends on D235529

Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3cea7ede5ec9 part1 : make SPSIterator find the SPS in the ctor. r=padenot https://hg.mozilla.org/integration/autoland/rev/e85efe0deebf part2 : compare SPS by its members, not using memcmp. r=padenot https://hg.mozilla.org/integration/autoland/rev/7db794a2c51f part3 : only update changed SPS/PPS/VPS nalu for extradata. r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/c0e426038ce1 part4 : enable testHEVCInbandConfigChange. r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/228ff31dd429 part5 : add gtest for SPSIterator. r=media-playback-reviewers,padenot
Blocks: 1944991
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: