[Spice-commits] server/sound.c

Uri Lublin uril at kemper.freedesktop.org
Tue Dec 12 16:41:21 UTC 2017


 server/sound.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2d0d87277569e7e393cf896ea9372a2e3e6fbdd5
Author: Uri Lublin <uril at redhat.com>
Date:   Thu Nov 16 16:11:43 2017 +0200

    sound: fix params order when calling snd_desired_audio_mode
    
    Make sure client_can_celt is passed before client_can_opus
    
    The bug was present since introduction of opus in ce9b714137a767b81f2
    
    Found by Coverity.
    
    Signed-off-by: Uri Lublin <uril at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/server/sound.c b/server/sound.c
index b1bfaaaa..68f3484d 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -1452,7 +1452,7 @@ void snd_set_playback_compression(bool on)
             bool client_can_opus = red_channel_client_test_remote_cap(rcc,
                                     SPICE_PLAYBACK_CAP_OPUS);
             int desired_mode = snd_desired_audio_mode(on, now->frequency,
-                                                      client_can_opus, client_can_celt);
+                                                      client_can_celt, client_can_opus);
             if (playback->mode != desired_mode) {
                 playback->mode = desired_mode;
                 snd_set_command(client, SND_PLAYBACK_MODE_MASK);


More information about the Spice-commits mailing list