Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: media/capture/webm_muxer.cc

Issue 1486623004: MediaStreamRecorder: enable in Android (including linking libwebm) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Connect RendererBlinkPlatformImpl::createMediaRecorderHandler() Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/BUILD.gn ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/webm_muxer.cc
diff --git a/media/capture/webm_muxer.cc b/media/capture/webm_muxer.cc
index 5e569bcb8ecaa24859209b76ae368310e004887d..939cb397ca1569bfc431529d4d9f7fe6aa63ebad 100644
--- a/media/capture/webm_muxer.cc
+++ b/media/capture/webm_muxer.cc
@@ -45,8 +45,10 @@ void WriteOpusHeader(const media::AudioParameters& params, uint8* header) {
header[OPUS_EXTRADATA_NUM_STREAMS_OFFSET] = params.channels();
header[OPUS_EXTRADATA_NUM_COUPLED_OFFSET] = 0;
// Set the actual stream map.
- memcpy(header + OPUS_EXTRADATA_STREAM_MAP_OFFSET,
- kOpusVorbisChannelMap[params.channels() - 1], params.channels());
+ for (int i = 0; i < params.channels(); ++i) {
+ header[OPUS_EXTRADATA_STREAM_MAP_OFFSET + i] =
+ kOpusVorbisChannelMap[params.channels() - 1][i];
+ }
} else {
header[OPUS_EXTRADATA_CHANNEL_MAPPING_OFFSET] = 0;
}
« no previous file with comments | « media/BUILD.gn ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698