Closed
Bug 1399833
Opened 7 years ago
Closed 7 years ago
Uninitialized variables in CubebUtils
Categories
(Core :: Audio/Video: cubeb, defect, P3)
Core
Audio/Video: cubeb
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox56 | --- | unaffected |
firefox57 | --- | unaffected |
firefox58 | --- | fixed |
People
(Reporter: philn, Assigned: philn)
References
Details
Attachments
(2 files)
982 bytes,
patch
|
Details | Diff | Splinter Review | |
1.00 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36 Steps to reproduce: For gecko-media we don't rely on Preferences (yet?) so we need default values for at least the sCubebPlaybackLatencyInMilliseconds variable.
Assignee | ||
Updated•7 years ago
|
Blocks: servo-media
Assignee | ||
Updated•7 years ago
|
Summary: Uninitialized variables → Uninitialized variables in CubebUtils
Assignee | ||
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Attachment #8908083 -
Flags: review?(cpearce)
Updated•7 years ago
|
Component: Audio/Video → Audio/Video: cubeb
Comment 2•7 years ago
|
||
Does this apply to 56?
Comment 3•7 years ago
|
||
Maire, you don't need to worry about this. This is not a problem in Firefox. These variables are initialized when we initialize Cubeb in Firefox. I'm setting the tracking flags to unaffected so that nobody panics about this. For the gecko-media Rust crate, I think we can just initialize the Preferences system so that these prefs are initialized just like they are in Firefox. I'm part way through that patch.
Comment 4•7 years ago
|
||
Comment on attachment 8908083 [details] [diff] [review] proposed.patch I think sCubebPlaybackLatencyInMillisecond should be initialized to CUBEB_NORMAL_LATENCY_MS. I think sCubebMSGLatencyInFrames should be initiaized to CUBEB_NORMAL_LATENCY_FRAMES. Paul, can you take a look at this and suggest whether these are sane default values? We need these as we're exporting Gecko's media stack out into a Rust crate, and the preferences system isn't stood up yet.
Attachment #8908083 -
Flags: review?(cpearce) → review?(padenot)
Comment 5•7 years ago
|
||
Comment on attachment 8908083 [details] [diff] [review] proposed.patch Review of attachment 8908083 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/CubebUtils.cpp @@ +106,5 @@ > Shutdown > } sCubebState = CubebState::Uninitialized; > cubeb* sCubebContext; > +double sVolumeScale = 1.0; > +uint32_t sCubebPlaybackLatencyInMilliseconds = 1; Makes this 100 milliseconds. @@ +107,5 @@ > } sCubebState = CubebState::Uninitialized; > cubeb* sCubebContext; > +double sVolumeScale = 1.0; > +uint32_t sCubebPlaybackLatencyInMilliseconds = 1; > +uint32_t sCubebMSGLatencyInFrames = 128; Make this 512 frames. Note that in practice, we get this value via cubeb, it depends widely on the platform.
Attachment #8908083 -
Flags: review?(padenot)
Comment 6•7 years ago
|
||
This is needed for Servo's gecko-media where there is no support for Mozilla Preferences. MozReview-Commit-ID: HbDT42SRrE3
Updated•7 years ago
|
Assignee: nobody → cpearce
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by cpearce@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a0bd70eac827 set default values for variables controlled by Preferences. r=padenot
Updated•7 years ago
|
Assignee: cpearce → philn
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a0bd70eac827
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•