[PATCH v2 22/30] Encapsulate dcc_release_glz

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/dcc-encoders.c | 4 +++-
 server/dcc-encoders.h | 1 -
 server/dcc.c          | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c
index ae95f1a..fbe9661 100644
--- a/server/dcc-encoders.c
+++ b/server/dcc-encoders.c
@@ -64,6 +64,7 @@ static void image_encoders_free_glz_drawable_instance(ImageEncoders *enc,
                                                       GlzDrawableInstanceItem *instance);
 static void encoder_data_init(EncoderData *data);
 static void encoder_data_reset(EncoderData *data);
+static void image_encoders_release_glz(ImageEncoders *enc);
 
 
 static SPICE_GNUC_NORETURN SPICE_GNUC_PRINTF(2, 3) void
@@ -456,6 +457,7 @@ void image_encoders_init(ImageEncoders *enc)
 
 void image_encoders_free(ImageEncoders *enc)
 {
+    image_encoders_release_glz(enc);
     quic_destroy(enc->quic);
     enc->quic = NULL;
     lz_destroy(enc->lz);
@@ -760,7 +762,7 @@ gboolean image_encoders_glz_create(ImageEncoders *enc, uint8_t id)
 }
 
 /* destroy encoder, and dictionary if no one uses it*/
-void image_encoders_release_glz(ImageEncoders *enc)
+static void image_encoders_release_glz(ImageEncoders *enc)
 {
     GlzSharedDictionary *shared_dict;
 
diff --git a/server/dcc-encoders.h b/server/dcc-encoders.h
index b7a8b91..673136a 100644
--- a/server/dcc-encoders.h
+++ b/server/dcc-encoders.h
@@ -41,7 +41,6 @@ int image_encoders_free_some_independent_glz_drawables(ImageEncoders *enc);
 void image_encoders_free_glz_drawables(ImageEncoders *enc);
 void image_encoders_free_glz_drawables_to_free(ImageEncoders* enc);
 gboolean image_encoders_glz_create(ImageEncoders *enc, uint8_t id);
-void image_encoders_release_glz(ImageEncoders *enc);
 void image_encoders_glz_free_from_drawable(struct Drawable *drawable);
 void image_encoders_glz_detach_from_drawable(struct Drawable *drawable);
 void image_encoders_glz_get_restore_data(ImageEncoders *enc,
diff --git a/server/dcc.c b/server/dcc.c
index 624b136..c906265 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -489,7 +489,6 @@ void dcc_stop(DisplayChannelClient *dcc)
 
     pixmap_cache_unref(dcc->pixmap_cache);
     dcc->pixmap_cache = NULL;
-    image_encoders_release_glz(&dcc->encoders);
     dcc_palette_cache_reset(dcc);
     free(dcc->send_data.stream_outbuf);
     free(dcc->send_data.free_list.res);
-- 
2.7.4

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]