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
This commit is contained in:
Arnaud Vrac 2015-09-18 19:15:45 +02:00 committed by Jan Schmidt
parent 7baa2736d9
commit 344fe03f09

View file

@ -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