<div dir="ltr">ping<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 4, 2019 at 10:08 AM Kevin Pouget <<a href="mailto:kpouget@redhat.com">kpouget@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Interrupt the video streams when the user changes the preferred<br>
video-codecs (dcc_handle_preferred_video_codec_type) or when the host<br>
admin updates the list of video-codecs allowed<br>
(display_channel_set_video_codecs).<br>
<br>
The video streaming will be automatically restarted by spice<br>
video-detection rules.<br>
---<br>
 server/dcc.c             | 2 ++<br>
 server/display-channel.c | 2 ++<br>
 2 files changed, 4 insertions(+)<br>
<br>
diff --git a/server/dcc.c b/server/dcc.c<br>
index 71d09b77..86893ffe 100644<br>
--- a/server/dcc.c<br>
+++ b/server/dcc.c<br>
@@ -1198,6 +1198,8 @@ static int dcc_handle_preferred_video_codec_type(DisplayChannelClient *dcc,<br>
<br>
     /* New client preference */<br>
     dcc_update_preferred_video_codecs(dcc);<br>
+    video_stream_detach_and_stop(DCC_TO_DC(dcc));<br>
+<br>
     return TRUE;<br>
 }<br>
<br>
diff --git a/server/display-channel.c b/server/display-channel.c<br>
index 4677c261..75266598 100644<br>
--- a/server/display-channel.c<br>
+++ b/server/display-channel.c<br>
@@ -255,6 +255,8 @@ void display_channel_set_video_codecs(DisplayChannel *display, GArray *video_cod<br>
     g_clear_pointer(&display->priv->video_codecs, g_array_unref);<br>
     display->priv->video_codecs = g_array_ref(video_codecs);<br>
     g_object_notify(G_OBJECT(display), "video-codecs");<br>
+<br>
+    video_stream_detach_and_stop(display);<br>
 }<br>
<br>
 GArray *display_channel_get_video_codecs(DisplayChannel *display)<br>
-- <br>
2.21.0<br>
<br>
</blockquote></div>