diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2017-01-09 09:51:06 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2017-01-09 10:06:24 +0000 |
commit | 702d6379b934a6bb182b5a51aed3145fe47e9f1f (patch) | |
tree | f5dfdfb960d9d458def424e747dfbf100482753c | |
parent | 66c705caca74f61ffce8637bee38b1e5e4909062 (diff) |
streaming: Allows protocol to have more codecs
The source file contains a list of fixed codecs for streaming.
This list is tested to include all codecs from spice-protocol.
If spice-protocol is extended to add more codecs this file starts
failing to compile due to missing codecs.
This patch allow to compile supporting less codecs than the
ones listed in spice-protocol.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
-rw-r--r-- | src/channel-display-gst.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c index 2b4ef7f..9786342 100644 --- a/src/channel-display-gst.c +++ b/src/channel-display-gst.c @@ -79,10 +79,10 @@ static struct { }; -G_STATIC_ASSERT(G_N_ELEMENTS(gst_opts) == SPICE_VIDEO_CODEC_TYPE_ENUM_END); +G_STATIC_ASSERT(G_N_ELEMENTS(gst_opts) <= SPICE_VIDEO_CODEC_TYPE_ENUM_END); #define VALID_VIDEO_CODEC_TYPE(codec) \ - (codec > 0 && codec < SPICE_VIDEO_CODEC_TYPE_ENUM_END) + (codec > 0 && codec < G_N_ELEMENTS(gst_opts)) /* ---------- SpiceFrame ---------- */ |