Closed
Bug 1276849
Opened 9 years ago
Closed 9 years ago
Some AudioStream::OpenCubeb() code cleanup
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Since OpenCubeb() is always called synchronously inside Init(), we won't continue using an object should Init() fail. Therefore OpenCubeb() can just return an error without setting mState to ERRORED.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/56820/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/56820/
Attachment #8758564 -
Flags: review?(kinetik)
Assignee | ||
Comment 3•9 years ago
|
||
https://reviewboard.mozilla.org/r/56820/#review53524
::: dom/media/AudioStream.cpp
(Diff revision 1)
> const dom::AudioChannel aAudioChannel)
> {
> auto startTime = TimeStamp::Now();
> mIsFirst = CubebUtils::GetFirstStream();
>
> - if (!CubebUtils::GetCubebContext()) {
OpenCubeb() will call that.
::: dom/media/AudioStream.cpp
(Diff revision 1)
> - NS_WARNING(nsPrintfCString("AudioStream::OpenCubeb() %p failed to init cubeb", this).get());
> + NS_WARNING(nsPrintfCString("AudioStream::OpenCubeb() %p failed to init cubeb", this).get());
> - return NS_ERROR_FAILURE;
> + return NS_ERROR_FAILURE;
> - }
> + }
> - }
> -
> - mState = INITIALIZED;
mState is already INITIALIZED. No need to set it again.
Updated•9 years ago
|
Attachment #8758564 -
Flags: review?(kinetik) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8758564 [details]
MozReview Request: Bug 1276849 - some AudioStream::OpenCubeb code cleanup. r=kinetik.
https://reviewboard.mozilla.org/r/56820/#review53530
Assignee | ||
Comment 5•9 years ago
|
||
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/408312a8ef14
some AudioStream::OpenCubeb code cleanup. r=kinetik.
Comment 7•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•