[Spice-devel] [PATCH 5/7] gstreamer: Peephole optimisation for SpiceFormatForGStreamer

Frediano Ziglio fziglio at redhat.com
Thu Aug 11 08:50:54 UTC 2016


Reduce structure length using static allocated string inside the
structure.
This will also avoid using .data.rel.ro section and relocations
reducing even more library size.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/gstreamer-encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
index 78d4f74..1221612 100644
--- a/server/gstreamer-encoder.c
+++ b/server/gstreamer-encoder.c
@@ -40,7 +40,7 @@
 
 typedef struct {
     SpiceBitmapFmt spice_format;
-    const char *format;
+    char format[8];
     uint32_t bpp;
     uint32_t depth;
     uint32_t endianness;
-- 
2.7.4



More information about the Spice-devel mailing list