Closed
Bug 1120247
Opened 10 years ago
Closed 10 years ago
MediaCodecReader::ResetDecode() needs to reject(cancel) any pending promises
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: cpearce, Assigned: bechen)
References
Details
Attachments
(1 file, 1 obsolete file)
1.38 KB,
patch
|
bechen
:
review+
|
Details | Diff | Splinter Review |
I'm pretty sure MediaCodecReader::ResetDecode() should reject(cancel) any pending promises when it runs.
I suspect we need to set some sort of threadsafe flag to prevent any running decode tasks from returning output, and then flush decoding, then reject the promises with CANCELED.
Assignee | ||
Comment 1•10 years ago
|
||
1. Return cancel by promise in ResetDecode().
2. In addition, I change the AwaitIdle() to Flush() again because at bug 1114910 comment 7, "Remove self dispatch code" and "Flush() -> AwaiteIdle()" should be done together. But at last, I kept the code of dispatch to self, forgot to change back the Flush() function.
Attachment #8550244 -
Flags: review?(cpearce)
Reporter | ||
Comment 2•10 years ago
|
||
Comment on attachment 8550244 [details] [diff] [review]
bug-1120247.v01.patch
Review of attachment 8550244 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
::: dom/media/omx/MediaCodecReader.cpp
@@ +759,5 @@
> {
> if (CheckAudioResources()) {
> + mAudioTrack.mTaskQueue->Flush();
> + MonitorAutoLock al(mAudioTrack.mTrackMonitor);
> + if(!mAudioTrack.mAudioPromise.IsEmpty()) {
Space between "if" and "(", i.e.:
if (!mAudioTrack.mAudioPromise.IsEmpty())
Not:
if(!mAudioTrack.mAudioPromise.IsEmpty())
@@ +768,5 @@
> }
> if (CheckVideoResources()) {
> + mVideoTrack.mTaskQueue->Flush();
> + MonitorAutoLock al(mVideoTrack.mTrackMonitor);
> + if(!mVideoTrack.mVideoPromise.IsEmpty()) {
Space between "if" and "(".
Attachment #8550244 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 3•10 years ago
|
||
r=cpearce
try server:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c19dae66fd51
Attachment #8550244 -
Attachment is obsolete: true
Attachment #8551632 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 4•10 years ago
|
||
bechen, do you know if the debug static analysis build failure related to this change from the try run ?
Flags: needinfo?(bechen)
Keywords: checkin-needed
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #4)
> bechen, do you know if the debug static analysis build failure related to
> this change from the try run ?
From
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c19dae66fd51&filter-searchStr=OS%20X%2010.7%2064-bit%20try%20debug%20static%20analysis%20build
I don't think it is related to my patch because my patch only works on b2g platform.
But at bug 1091467 comment 12, https://treeherder.mozilla.org/#/jobs?repo=try&revision=7c358be71032,
It shows the same error.
Do you know where I can find out more details like build logs, static analysis logs?
Because for now I can only see the logs from comment 3. That doesn't tell me where is the failure of static analysis.
Flags: needinfo?(bechen) → needinfo?(cbook)
Assignee | ||
Comment 6•10 years ago
|
||
Push to try again:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=33c95d115f87
Assignee | ||
Comment 7•10 years ago
|
||
Keywords: checkin-needed
Comment 8•10 years ago
|
||
Keywords: checkin-needed
Comment 9•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Updated•10 years ago
|
Flags: needinfo?(cbook)
You need to log in
before you can comment on or make changes to this bug.
Description
•