Closed Bug 1067725 Opened 11 years ago Closed 10 years ago

MediaDecoderReader waiting for resources (or ReadMetadata) should be async

Categories

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

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cpearce, Unassigned)

References

Details

Attachments

(1 obsolete file)

The current MediaDecoderReader "waiting for resources" pattern is to have a function that the state machine polls to check whether it should call ReadMetadata() again (IsWaitingForResources()), and the state machine calls IsWaitingForResources() again after calling ReadMetadata() to check if it fails. This is bad, because as we found with bug 1065855 there can be races W.R.T. the is waiting state changing and the return value of IsWaitingForResources() changing. We fixed it in bug 1065855 by adding more polling, but that fix relies upon the Reader's IsWaitingForResources() syncing state on the decoder monitor, which implementations could easily forget to do. Ideally we should make this wait async instead of polling, which is vulnerable to races.
Component: Audio/Video → Audio/Video: Playback
Status: NEW → RESOLVED
Closed: 10 years ago
Depends on: 1208931
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: