Commit 667f16c2 authored by Oliver Gutierrez's avatar Oliver Gutierrez Committed by Christophe Fergeau

playback: Don't try to access undefined source buffer

The playback code first tries to access this.source_buffer and then
would check whether it's defined.

This was causing unwanted exception to be thrown in the cockpit
spice-html5 plugin.
parent a8c40637
......@@ -100,6 +100,9 @@ SpicePlaybackConn.prototype.process_channel_message = function(msg)
data.time = this.last_data_time + 1;
if (! this.source_buffer)
return true;
/* Gap detection: If there has been a delay since our last packet, then audio must
have paused. Handling that gets tricky. In Chrome, you can seek forward,
but you cannot in Firefox. And seeking forward in Chrome is nice, as it keeps
......@@ -120,9 +123,6 @@ SpicePlaybackConn.prototype.process_channel_message = function(msg)
PLAYBACK_DEBUG > 1 && console.log("PlaybackData; time " + data.time + "; length " +;
if (! this.source_buffer)
return true;
if (this.start_time == 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment