Missing detailed log...

Based on a patch from Frediano Ziglio <fzig...@redhat.com>

Signed-off-by: Christophe Fergeau <cferg...@redhat.com>
---
As the log indicates, a better log would be needed for this one.

Christophe


 server/sound.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/server/sound.c b/server/sound.c
index 1eab75b..bd9bb66 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -1153,11 +1153,14 @@ SPICE_GNUC_VISIBLE void 
spice_server_playback_get_buffer(SpicePlaybackInstance *
                                                          uint32_t **frame, 
uint32_t *num_samples)
 {
     SndChannelClient *client = sin->st->channel.connection;
-    PlaybackChannelClient *playback_client = SPICE_CONTAINEROF(client, 
PlaybackChannelClient, base);
 
-    if (!client || !playback_client->free_frames) {
-        *frame = NULL;
-        *num_samples = 0;
+    *frame = NULL;
+    *num_samples = 0;
+    if (!client) {
+        return;
+    }
+    PlaybackChannelClient *playback_client = SPICE_CONTAINEROF(client, 
PlaybackChannelClient, base);
+    if (!playback_client->free_frames) {
         return;
     }
     spice_assert(client->active);
-- 
2.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to