From 344fe03f096b8fc9f6a38d9f844addc0da74ed3e Mon Sep 17 00:00:00 2001 From: Arnaud Vrac Date: Fri, 18 Sep 2015 19:15:45 +0200 Subject: [PATCH] dvdspu: skip unneeded reading of RLE data The RLE data was being read for dumping the SPU image even when the DUMP_FULL_IMAGE macro was not set. https://bugzilla.gnome.org/show_bug.cgi?id=663750 --- gst/dvdspu/gstspu-pgs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c index e485817eaf..590f20d41c 100644 --- a/gst/dvdspu/gstspu-pgs.c +++ b/gst/dvdspu/gstspu-pgs.c @@ -81,7 +81,8 @@ dump_bytes (guint8 * data, guint16 len) static void dump_rle_data (GstDVDSpu * dvdspu, guint8 * data, guint32 len) { - guint16 obj_h G_GNUC_UNUSED; +#if DUMP_FULL_IMAGE + guint16 obj_h; guint16 obj_w; guint8 *end = data + len; guint x = 0; @@ -141,7 +142,6 @@ dump_rle_data (GstDVDSpu * dvdspu, guint8 * data, guint32 len) } } -#if DUMP_FULL_IMAGE { gint i; #if 1 @@ -159,7 +159,6 @@ dump_rle_data (GstDVDSpu * dvdspu, guint8 * data, guint32 len) PGS_DUMP ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); #endif } -#endif x += run_len; if (!run_len || x > obj_w) @@ -167,6 +166,7 @@ dump_rle_data (GstDVDSpu * dvdspu, guint8 * data, guint32 len) }; PGS_DUMP ("\n"); +#endif } static void