[spice-html5 4/6] Revise the webm files to more correctly identify audio tracks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx>
---
 playback.js |  5 ++++-
 webm.js     | 11 +++--------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/playback.js b/playback.js
index 96efb08..ea5017f 100644
--- a/playback.js
+++ b/playback.js
@@ -186,10 +186,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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]