Closed Bug 1215441 Opened 9 years ago Closed 9 years ago

Skip flush before Init() is completed

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: ayang, Assigned: ayang)

Details

Attachments

(1 file)

It causes OMX returning error.
Attachment #8674750 - Flags: review?(sotaro.ikeda.g)
Attachment #8674750 - Flags: review?(sotaro.ikeda.g) → review+
Thanks for quick review!
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment on attachment 8674750 [details] [diff] [review] skip_flush_before_init_complete Review of attachment 8674750 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/platforms/gonk/GonkMediaDataDecoder.cpp @@ +103,5 @@ > GMDD_LOG("Decoder is not initialized"); > return NS_ERROR_UNEXPECTED; > } > + > + if (!mInitPromise.IsEmpty()) { this doesn't appear thread-safe. this will be called on the reader's taskqueue, while mInitPromise is typically resolved on the ACodec's TaskQueue. So the InitPromise is accessed via two different threads without locking.
(In reply to Jean-Yves Avenard [:jya] from comment #5) > Comment on attachment 8674750 [details] [diff] [review] > skip_flush_before_init_complete > > Review of attachment 8674750 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/media/platforms/gonk/GonkMediaDataDecoder.cpp > @@ +103,5 @@ > > GMDD_LOG("Decoder is not initialized"); > > return NS_ERROR_UNEXPECTED; > > } > > + > > + if (!mInitPromise.IsEmpty()) { > > this doesn't appear thread-safe. > this will be called on the reader's taskqueue, while mInitPromise is > typically resolved on the ACodec's TaskQueue. > > So the InitPromise is accessed via two different threads without locking. I think mInitPromise is resolved in reader task queue. https://dxr.mozilla.org/mozilla-central/rev/1a157155a4fe0074b3d03b54fe9e466472c2cd56/dom/media/platforms/gonk/GonkVideoDecoderManager.cpp#121
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: