[spice-gtk] streaming: Allows protocol to have more codecs

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

 



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@xxxxxxxxxx>
---
 src/channel-display-gst.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index f52299f..1f8fce5 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 ---------- */
 
-- 
2.9.3

_______________________________________________
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]