[Spice-devel] [PATCH] Fixed error when trying to access undefined source buffer without checking it first
Christophe Fergeau
cfergeau at redhat.com
Wed Aug 3 10:32:35 UTC 2016
I've pushed this after rewording the commit log.
Thanks!
Christophe
On Thu, Jul 28, 2016 at 10:50:05AM +0100, Oliver Gutierrez wrote:
> ---
> playback.js | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/playback.js b/playback.js
> index 9659381..b5954da 100644
> --- a/playback.js
> +++ b/playback.js
> @@ -107,21 +107,20 @@ SpicePlaybackConn.prototype.process_channel_message = function(msg)
> So we do two things. First, we seek forward. Second, we compute how much of a gap
> there would have been, and essentially eliminate it.
> */
> + if (! this.source_buffer)
> + return true;
> +
> if (this.last_data_time && data.time >= (this.last_data_time + GAP_DETECTION_THRESHOLD))
> {
> this.skip_until = data.time;
> - this.gap_time = (data.time - this.start_time) -
> + this.gap_time = (data.time - this.start_time) -
> (this.source_buffer.buffered.end(this.source_buffer.buffered.end.length - 1) * 1000.0).toFixed(0);
> }
>
> this.last_data_time = data.time;
>
> -
> DEBUG > 1 && console.log("PlaybackData; time " + data.time + "; length " + data.data.byteLength);
>
> - if (! this.source_buffer)
> - return true;
> -
> if (this.start_time == 0)
> this.start_playback(data);
>
> --
> 2.7.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160803/071b5c01/attachment-0001.sig>
More information about the Spice-devel
mailing list