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

Unified Diff: ppapi/examples/audio_encode/audio_encode.html

Issue 1640703002: ppapi: examples: audio_encode: fix opus comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/audio_encode/audio_encode.html
diff --git a/ppapi/examples/audio_encode/audio_encode.html b/ppapi/examples/audio_encode/audio_encode.html
index 14cab7b3a2f8d8553532fe2736c74e8dd02f1e6e..addeb1a238a01dea90ca42358c7cd2d249aab8a6 100644
--- a/ppapi/examples/audio_encode/audio_encode.html
+++ b/ppapi/examples/audio_encode/audio_encode.html
@@ -231,13 +231,13 @@
this._writePage(this._Start, buffer.byteLength);
this.buffer.appendData(buffer);
this._writePageChecksum(start);
- this._writeCommentHeader('OpusTags');
+ this._writeCommentHeader();
},
_writeCommentHeader: function(name) {
var start = this.buffer.getSize();
var buffer = new Uint8Array(8 + 4 + 8 + 4 + 4 + 13), i = 0;
// Opus comment header.
- i += writeString(buffer, i, name);
+ i += writeString(buffer, i, 'OpusTags');
// Vendor string.
i += this._writeLengthString(buffer, i, 'Chromium');
// User comment list length
@@ -245,13 +245,13 @@
// User comment 0 length.
i += this._writeLengthString(buffer, i, 'TITLE=example');
- this._writePage(this._Continue, buffer.byteLength);
+ this._writePage(0, buffer.byteLength);
this.buffer.appendData(buffer);
this._writePageChecksum(start);
},
_writeLengthString: function(buffer, offset, str) {
- return (writeValue(buffer, offset, 4, str.length) +
- writeString(buffer, offset, str));
+ return (writeValue(buffer, 4, offset, str.length) +
+ writeString(buffer, offset + 4, str));
},
writeData: function(data) {
this.position += this.format.sample_per_frame / this.format.channels;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698