[Spice-devel] [PATCH spice-html5 4/4] Display: Add support for the VP9 codec type

Jeremy White jwhite at codeweavers.com
Tue Jun 20 20:44:41 UTC 2017


Hi,

One tiny niggle:

On 06/08/2017 09:27 AM, Pavel Grunt wrote:
> @@ -606,7 +607,8 @@ SpiceDisplayConn.prototype.process_channel_message = function(msg)
>          if (this.streams[m.base.id].codec_type === SPICE_VIDEO_CODEC_TYPE_MJPEG)
>              process_mjpeg_stream_data(this, m, time_until_due);
>  
> -        if (this.streams[m.base.id].codec_type === SPICE_VIDEO_CODEC_TYPE_VP8)
> +        if (this.streams[m.base.id].codec_type === SPICE_VIDEO_CODEC_TYPE_VP8 ||
> +            this.streams[m.base.id].codec_type == SPICE_VIDEO_CODEC_TYPE_VP9)
>              process_video_stream_data(this.streams[m.base.id], m);
>  
>          return true;

The original author of this code did a poor job of deciding whether or
not to use '===' everywhere or whether to use '=='.  There appears to be
some debate, with the consensus being that '===' is often more
appropriate.  Sadly, this code base mixes the two, and mostly uses '=='.

I'd ask that this if statement be at least internally consistent.  I
don't know that it is clear to me whether it should be '==' or '==='.

Cheers,

Jeremy


More information about the Spice-devel mailing list