[Spice-devel] [server] streaming: Don't start streaming if there is no video encoder

Francois Gouget fgouget at codeweavers.com
Fri Jul 22 18:11:07 UTC 2016


Without a video encoder no frame will be streamed anyway.
This fixes the case where the client does not support any of the
server's codecs, such as if it was compiled with --enable-gstvideo=no
--disable-builtin-mjpeg.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 server/dcc-send.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/dcc-send.c b/server/dcc-send.c
index f5a409d..56bbf23 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -2159,6 +2159,10 @@ static void marshall_stream_start(RedChannelClient *rcc,
 
     agent->last_send_time = 0;
     spice_assert(stream);
+    if (!agent->video_encoder) {
+        /* Without a video encoder nothing will be streamed */
+        return;
+    }
     red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_STREAM_CREATE, NULL);
     SpiceMsgDisplayStreamCreate stream_create;
     SpiceClipRects clip_rects;
-- 
2.8.1


More information about the Spice-devel mailing list