Closed Bug 1057978 Opened 5 years ago Closed 5 years ago

MediaDecoderStateMachine::Seek() should do nothing while shutting down

Categories

(Core :: Audio/Video, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(1 file)

It is possible that MediaDecoderStateMachine::Seek() happens on the main thread while MediaDecoderStateMachine::DecodeError() is happening on the decoding thread. If DecodeError() runs first, Seek() will change mState from DECODER_STATE_SHUTDOWN to DECODER_STATE_SEEKING which is a terrible error.
Handle shutdown in MediaDecoderStateMachine::Seek() which should not change |mState| from DECODER_STATE_SHUTDOWN to DECODER_STATE_SEEKING.
Assignee: nobody → jwwang
Status: NEW → ASSIGNED
Attachment #8478135 - Flags: review?(cpearce)
Comment on attachment 8478135 [details] [diff] [review]
1057978_fix_MediaDecoderStateMachine_Seek_while_shutdown-v1.patch

Review of attachment 8478135 [details] [diff] [review]:
-----------------------------------------------------------------

Yes!
Attachment #8478135 - Flags: review?(cpearce) → review+
This is a simple change. I will save the Try.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a5ccd601909c
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.