Closed Bug 1144341 Opened 8 years ago Closed 8 years ago

remove decoder from TrackBuffer when initialization is aborted

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: karlt, Assigned: karlt)

Details

(Keywords: memory-leak)

Attachments

(1 file)

      No description provided.
but not explicitly when shutting down as shutdown will do that for us.

This provides consistency in all the places where initialization may be
aborted.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=995c32e9bc58
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e75e26e21e8a
Attachment #8578885 - Flags: review?(jyavenard)
Comment on attachment 8578885 [details] [diff] [review]
RemoveDecoder() when initialization is aborted

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

As discussed on IRC, I think it would be a much better approach to have Shutdown only work on mInitializedDecoders and TrackBuffer::InitializeDecoder has ownership of the decoder. So if it detects a shutdown or an abort, it calls RemoveDecoder on it.
Attachment #8578885 - Flags: review?(jyavenard) → review+
(In reply to Jean-Yves Avenard [:jya] from comment #2)
> As discussed on IRC, I think it would be a much better approach to have
> Shutdown only work on mInitializedDecoders and
> TrackBuffer::InitializeDecoder has ownership of the decoder. So if it
> detects a shutdown or an abort, it calls RemoveDecoder on it.

OK, removing the RemoveDecoder() calls from the mShutdown paths wouldn't be helpful then, so I kept only the parts of the patch that add RemoveDecoder() calls to the mCurrentDecoder != aDecoder paths.

https://hg.mozilla.org/integration/mozilla-inbound/rev/6037ec00d4d2

This case may be too racy to test reliably.
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/6037ec00d4d2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Keywords: mlk
You need to log in before you can comment on or make changes to this bug.