Closed Bug 1914450 Opened 1 year ago Closed 1 year ago

Bring changes in 1913311 to the encoder

Categories

(Core :: Audio/Video: Web Codecs, defect, P1)

defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: chunmin, Assigned: chunmin)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Theoretically, the crash pattern in bug 1913311 could also happen on the encoder side since the encoder's architecture is symmetric to the decoder's. Therefore, the changes in bug 1913311 for DecodeAgent should also be applied to the EncoderAgent.

Summary: Bring changes in 1913311 to the encoder. → Bring changes in 1913311 to the encoder

This patch addresses a potential crash that could occur if
EncodeAgent::Shutdown is called after PEMFactory fails to create an encoder in EncoderAgent::Configure`, leading to a failed assertion due
to the absence of the expected encoder. This crash pattern is similar to
the one described in bug 1913311.

To resolve this issue, the same method used in bug 1913311 has been
applied. This patch ensures that Encoder::Shutdown can be safely
called even when the MediaDataEncoder is no present, preventing the
crash from occuring.

Depends on D219912

Attachment #9420410 - Attachment description: WIP: Bug 1914450 - Revise commit when no decoder in DecoderAgent::Shutdown → WIP: Bug 1914450 - Revise comment for DecoderAgent::Shutdown w/o a decoder
Attachment #9420408 - Attachment description: WIP: Bug 1914450 - Prohibit shut DecoderAgent down while it's shutting down → Bug 1914450 - Prohibit shut DecoderAgent down while it's shutting down
Attachment #9420409 - Attachment description: WIP: Bug 1914450 - Allow calling EncoderAgent::Shutdown without active MediaDataEncoder → Bug 1914450 - Allow calling EncoderAgent::Shutdown without active MediaDataEncoder
Attachment #9420410 - Attachment description: WIP: Bug 1914450 - Revise comment for DecoderAgent::Shutdown w/o a decoder → Bug 1914450 - Revise comment for DecoderAgent::Shutdown w/o a decoder
Pushed by cchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1400a9d3f766 Prohibit shut DecoderAgent down while it's shutting down r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/41fc8585ac30 Allow calling EncoderAgent::Shutdown without active MediaDataEncoder r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/460b6005a451 Revise comment for DecoderAgent::Shutdown w/o a decoder r=media-playback-reviewers,padenot
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: