Closed
Bug 1215439
Opened 9 years ago
Closed 9 years ago
Don't call ResetDecode() in the destructor of MediaDecoderReader
Categories
(Core :: Audio/Video: Playback, defect, P2)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(1 file)
http://www.artima.com/cppsource/nevercall.html
ResetDecode() is a virtual method and it is bad to call it in the destructor. Furthermore, I don't see the necessity to call it in the destructor.
nsresult MediaDecoderReader::ResetDecode()
{
VideoQueue().Reset(); <-- we don't care about it since it will be destroyed soon.
AudioQueue().Reset(); <-- ditto.
mAudioDiscontinuity = true; <-- don't care
mVideoDiscontinuity = true; <-- don't care
mBaseAudioPromise.RejectIfExists(CANCELED, __func__); <-- already rejected in Shutdown()
mBaseVideoPromise.RejectIfExists(CANCELED, __func__); <-- ditto.
return NS_OK;
}
We should be fine without calling ResetDecode() in the destructor.
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1215439 - Don't call ResetDecode() in the destructor of MediaDecoderReader. r=gerald.
Attachment #8675489 -
Flags: review?(gsquelart)
Comment on attachment 8675489 [details]
MozReview Request: Bug 1215439 - Don't call ResetDecode() in the destructor of MediaDecoderReader. r=gerald.
https://reviewboard.mozilla.org/r/22381/#review19975
Makes sense.
Attachment #8675489 -
Flags: review?(gsquelart) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Thanks for the review!
Updated•9 years ago
|
Priority: -- → P2
Comment 5•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•