Closed Bug 974569 Opened 6 years ago Closed 6 years ago

[MediaEncoder] clean up OpusTrackEncoder array definitions

Categories

(Core :: Audio/Video: Recording, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: rillian, Assigned: rillian)

Details

Attachments

(1 file)

I don't understand the memcpy(foo.AppendElements(count), bar, count) construct. Why not just AppendElements(bar, count) directly?
Attached patch Cleaner codeSplinter Review
I noticed this checking unrelated behaviour and thought the code would be a little better this way. Verified locally with content/media mochitests, http://mozilla.github.io/qa-testcase-data/webapi/mediarecorder/ (patched to work) and static asserts on the magic string lengths.
Attachment #8378491 - Flags: review?(slin)
Comment on attachment 8378491 [details] [diff] [review]
Cleaner code

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

Thanks for the clean up! :)

> - Use ArrayLength instead of MOZ_ARRAY_LENGTH since we're
  in C++ code.
Yeah, I wasn't clear about the usage between these two, thanks for the heads-up.
Attachment #8378491 - Flags: review?(slin) → review+
https://hg.mozilla.org/mozilla-central/rev/22dc68fe321f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Component: Video/Audio → Video/Audio: Recording
You need to log in before you can comment on or make changes to this bug.