Closed Bug 1042308 Opened 10 years ago Closed 10 years ago

Forcibly return MediaBuffer to OMXCodec during OMXCodec shutdown

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1035755 +++

OMXCodec has a very strong restriction how MediaBuffer is handled during OMXCodec Shutdown. If there is even one MediaBuffer is held in gecko, OMXCodec crashes an current application process. It is necessary to prevent this situation on production build.

Until now, we fixed the problem by fixing all bugs reported to bugzilla. But this has a limitation. One solution is [3] in Bug 1009420 Comment 14. But it can be applied only to MediaCodec, it is still under investigation and it is not clear yet if it is possible solution.

One possible workaround to this problem is that OmxDecoder forcibly return MediaBuffer to OMXCodec if OmxDecoder detects the problematic situation during OMXCodec shutdown. It has a regression risk, but it might be better than the crash in production.
Assignee: nobody → sotaro.ikeda.g
Depends on: 985772
It is very difficult to prevent problem without such workaround. When one object is still holding TextureClient, a MediaBuffer of the TextureClient is not returned to OMXCodec. Sometimes, it is very difficult to analyze which object is holding a reference pointer to the TextureClient. We often can not get a actual STR of the crash.
Attachment #8461014 - Flags: review?(nical.bugzilla)
Attachment #8461014 - Flags: review?(cajbir.bugzilla)
Attachment #8461014 - Flags: review?(cajbir.bugzilla) → review+
Comment on attachment 8461014 [details] [diff] [review]
patch - Return All MediaBuffers to OMXCodec during OMXCodec shutdown

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

I am not very familiar with OMXDecoder but it looks good to me (with my limited knowledge of this stuff).
Attachment #8461014 - Flags: review?(nical.bugzilla) → review+
Add race condition fix. Carry "r=cajbir,nical".
Attachment #8461014 - Attachment is obsolete: true
Attachment #8461577 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/ef9dd45733b6
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: