[Spice-commits] src/channel-display-gst.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 3 08:09:15 UTC 2019


 src/channel-display-gst.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 67b14e4edcb8371a36e167e1fcbae8e9ed1a8758
Author: Snir Sheriber <ssheribe at redhat.com>
Date:   Wed Jan 2 17:41:52 2019 +0200

    use g_queue_free_full to free the queue
    
    Signed-off-by: Snir Sheriber <ssheribe at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 2c07f35..bd2a9ff 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -548,11 +548,7 @@ static void spice_gst_decoder_destroy(VideoDecoder *video_decoder)
         g_source_remove(decoder->timer_id);
     }
     g_mutex_clear(&decoder->queues_mutex);
-    SpiceGstFrame *gstframe;
-    while ((gstframe = g_queue_pop_head(decoder->decoding_queue))) {
-        free_gst_frame(gstframe);
-    }
-    g_queue_free(decoder->decoding_queue);
+    g_queue_free_full(decoder->decoding_queue, (GDestroyNotify)free_gst_frame);
     if (decoder->display_frame) {
         free_gst_frame(decoder->display_frame);
     }


More information about the Spice-commits mailing list