[Spice-devel] [PATCH spice-html5 10/11] Revise the webm files to more correctly identify audio tracks.
Jeremy White
jwhite at codeweavers.com
Wed May 13 13:32:18 PDT 2015
Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
playback.js | 5 ++++-
webm.js | 11 +++--------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/playback.js b/playback.js
index 7209fbe..f7044c6 100644
--- a/playback.js
+++ b/playback.js
@@ -167,10 +167,13 @@ SpicePlaybackConn.prototype.start_playback = function(data)
this.start_time = data.time;
var h = new webm_Header();
+ var te = new webm_AudioTrackEntry;
+ var t = new webm_Tracks(te);
- var mb = new ArrayBuffer(h.buffer_size())
+ var mb = new ArrayBuffer(h.buffer_size() + t.buffer_size())
this.bytes_written = h.to_buffer(mb);
+ this.bytes_written = t.to_buffer(mb, this.bytes_written);
this.source_buffer.addEventListener('error', handle_sourcebuffer_error, false);
this.source_buffer.addEventListener('updateend', handle_append_buffer_done, false);
diff --git a/webm.js b/webm.js
index 35cbc07..7d27b86 100644
--- a/webm.js
+++ b/webm.js
@@ -356,7 +356,7 @@ webm_SeekHead.prototype =
End of Seek Head
*/
-function webm_TrackEntry()
+function webm_AudioTrackEntry()
{
this.id = WEBM_TRACK_ENTRY;
this.number = 1;
@@ -385,7 +385,7 @@ function webm_TrackEntry()
];
}
-webm_TrackEntry.prototype =
+webm_AudioTrackEntry.prototype =
{
to_buffer: function(a, at)
{
@@ -526,9 +526,6 @@ function webm_Header()
this.info = new webm_SegmentInformation;
this.seek_head.track.pos = this.seek_head.info.pos + this.info.buffer_size();
-
- this.track_entry = new webm_TrackEntry;
- this.tracks = new webm_Tracks(this.track_entry);
}
webm_Header.prototype =
@@ -539,7 +536,6 @@ webm_Header.prototype =
at = this.ebml.to_buffer(a, at);
at = this.segment.to_buffer(a, at);
at = this.info.to_buffer(a, at);
- at = this.tracks.to_buffer(a, at);
return at;
},
@@ -547,7 +543,6 @@ webm_Header.prototype =
{
return this.ebml.buffer_size() +
this.segment.buffer_size() +
- this.info.buffer_size() +
- this.tracks.buffer_size();
+ this.info.buffer_size();
},
}
--
2.1.4
More information about the Spice-devel
mailing list