Closed
Bug 1295906
Opened 9 years ago
Closed 9 years ago
Move |mVideoFrameContainer->ClearCurrentFrame()| out of MediaFormatReader::ReleaseResources()
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla51
| Tracking | Status | |
|---|---|---|
| firefox51 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(1 file, 1 obsolete file)
VideoFrameContainer should be a concern of playback (MDSM/VideoSink) instead of a reader/decoder.
I will add a MediaSink::ClearVideoFrames() function to do the job.
By doing so, we allow MDSM to enter dormant state more aggressively without making noticeable effects to the user:
1. Enter dormant state when playback reaches the end to reclaim memory and hardware resources. Note we can't clear video frames which is visible to the user.
2. Enter dormant state when playback is paused for a certain amount of time to reclaim memory and hardware resources. Note we can't clear video frames which is visible to the user.
3. Enter dormant state when the document becomes inactive. Note we can clear video frames which is not visible to the user.
| Assignee | ||
Updated•9 years ago
|
| Assignee | ||
Comment 1•9 years ago
|
||
Since MDSM also holds a VideoFrameContainer, I will move the call to ClearCurrentFrame() to MediaDecoderStateMachine::FinishShutdown().
| Assignee | ||
Comment 2•9 years ago
|
||
Bug 1295901 has changed the function name.
Summary: Move |mVideoFrameContainer->ClearCurrentFrame()| out of MediaFormatReader::ReleaseMediaResources() → Move |mVideoFrameContainer->ClearCurrentFrame()| out of MediaFormatReader::ReleaseResources()
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Attachment #8782212 -
Flags: review?(jyavenard)
Comment 4•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8782212 [details]
Bug 1295906 - Move |mVideoFrameContainer->ClearCurrentFrame()| out of MediaFormatReader::ReleaseResources().
https://reviewboard.mozilla.org/r/72422/#review70896
Attachment #8782212 -
Flags: review?(jyavenard) → review+
| Assignee | ||
Comment 5•9 years ago
|
||
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6d2cc94bb92
Move |mVideoFrameContainer->ClearCurrentFrame()| out of MediaFormatReader::ReleaseResources(). r=jya
Comment 7•9 years ago
|
||
Sorry had to back this out for M-e10s crashes on Windows 7 debug, e.g., https://treeherder.mozilla.org/logviewer.html#?job_id=2364187&repo=autoland#L3321
Flags: needinfo?(jwwang)
Backout by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/35416a1541ae
Backed out changeset d6d2cc94bb92 for M-e10s crashes on Windows 7 debug
| Assignee | ||
Comment 9•9 years ago
|
||
It is interesting that MediaFormatReader::Shutdown() clears |mVideoFrameContainer| [1] before calling MediaDecoderReader::Shutdown() which calls ReleaseResources() [2]. Because |mVideoFrameContainer| is already cleared, |mVideoFrameContainer->ClearCurrentFrame()| is never called during the shutdown phase.
It is even more interesting that when we really call |mVideoFrameContainer->ClearCurrentFrame()| during the shutdown phase, it crashes!
The crash (comment 7) address is 0xffffffffe5e5e5f1 which is a UAF. Might need to use some helps from gfx guys.
[1] https://hg.mozilla.org/mozilla-central/file/052656fc513c05da969590ac5934abd67271a897/dom/media/MediaFormatReader.cpp#l141
[2] https://hg.mozilla.org/mozilla-central/file/052656fc513c05da969590ac5934abd67271a897/dom/media/MediaDecoderReader.cpp#l523
[3] https://hg.mozilla.org/mozilla-central/file/052656fc513c05da969590ac5934abd67271a897/dom/media/MediaFormatReader.cpp#l1977
Flags: needinfo?(jwwang)
| Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/try/rev/c63516139d86e9ab14238934aadf4719922edba8
This change still got crashes. I am almost sure there is something wrong in gfx so that calling ClearCurrentFrame() during shutdown causes crash.
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Attachment #8782212 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Attachment #8784643 -
Flags: review?(jyavenard)
| Comment hidden (mozreview-request) |
Comment 13•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8784643 [details]
Bug 1295906 - Remove the call to |mVideoFrameContainer->ClearCurrentFrame()| from ReleaseResources().
https://reviewboard.mozilla.org/r/73984/#review71980
Attachment #8784643 -
Flags: review?(jyavenard) → review+
| Assignee | ||
Comment 14•9 years ago
|
||
Thanks!
Comment 15•9 years ago
|
||
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/112c00ceea7c
Remove the call to |mVideoFrameContainer->ClearCurrentFrame()| from ReleaseResources(). r=jya
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Updated•9 years ago
|
Keywords: checkin-needed
Comment 16•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•