Closed
Bug 1238462
Opened 9 years ago
Closed 6 years ago
[emulator-x86-kk][mochitest] TEST-UNEXPECTED-FAIL | dom/media/test/test_playback.html | small-shot.m4a duration (NaN) should be around 0.29
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: hsinyi, Unassigned)
References
Details
Updated•9 years ago
|
Priority: -- → P2
Comment 1•9 years ago
|
||
The small-shot.m4a duration is assigned |MediaDecoderStateMachine::OnMetadataRead|, then send metadataload event to main thread.
I suspect there is a racing between "set mDuration" and "MediaDecoderStateMachine::EnqueueLoadedMetadataEvent".
1. The "set mDuration" is a Canonical, so it will dispatch a task(DoNotify) to self then dispatch to main thread.
2. "MediaDecoderStateMachine::EnqueueLoadedMetadataEvent" seems dispatch to main thread directly.
So the "metadataload event" is before than "mirror value update" in main thread. Once the "metadataload event" comes first, the HtmlMediaElement fires the async event "loadedmetadata" to js get the NaN duration.
JW, how do you think?
Flags: needinfo?(jwwang)
Comment 2•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/file/f59d1f7941b0b7358d6fa28179d60280ac2844b9/dom/media/MediaDecoder.cpp#l745
AbstractThread::MainThread() is assigned as the target thread when MediaDecoder registers a listener with the event source. Tail dispatching should kick when the event is published and sent to the listener.
You can run a debugger to make sure tail dispatching is activated.
Flags: needinfo?(jwwang)
Comment 3•9 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #2)
> https://hg.mozilla.org/mozilla-central/file/
> f59d1f7941b0b7358d6fa28179d60280ac2844b9/dom/media/MediaDecoder.cpp#l745
>
> AbstractThread::MainThread() is assigned as the target thread when
> MediaDecoder registers a listener with the event source. Tail dispatching
> should kick when the event is published and sent to the listener.
>
> You can run a debugger to make sure tail dispatching is activated.
https://dxr.mozilla.org/mozilla-central/source/xpcom/threads/StateMirroring.h#195
My point is that since the set function in canonical doesn't dispatch task to mainthread(mirror) directly.
So the loadedmetadata event will run before updateValue? If so, may cause the problem.
Comment 4•9 years ago
|
||
Direct tasks should run before tail dispatching.
Mass change P2 -> P3
Priority: P2 → P3
Reporter | ||
Comment 6•6 years ago
|
||
The project was canceled. Marked this as wontfix.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•