diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-07-25 12:19:07 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-07-25 12:19:07 +0100 |
commit | a20d86f1f525f79779727972925283910dc4173d (patch) | |
tree | 1a74530bd25bb11d571d564ef7c09a6336fa8550 /ext | |
parent | aaed93e1265959bb06c4759e68537788c9446681 (diff) | |
download | gst-plugins-bad-a20d86f1f525f79779727972925283910dc4173d.tar.gz gst-plugins-bad-a20d86f1f525f79779727972925283910dc4173d.tar.bz2 gst-plugins-bad-a20d86f1f525f79779727972925283910dc4173d.zip |
kate: break up macros into multiple lines
Diffstat (limited to 'ext')
-rw-r--r-- | ext/kate/gstkatespu.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ext/kate/gstkatespu.c b/ext/kate/gstkatespu.c index 760662c4..cc54cc4f 100644 --- a/ext/kate/gstkatespu.c +++ b/ext/kate/gstkatespu.c @@ -253,10 +253,21 @@ gst_kate_spu_crop_bitmap (GstKateEnc * ke, kate_bitmap * kb, guint16 * dx, kb->height = h; } -/* FIXME: fix macros */ -#define CHECK(x) do { guint16 _ = (x); if (G_UNLIKELY((_) > sz)) { GST_ELEMENT_ERROR (ke, STREAM, ENCODE, ("Attempt to read outide buffer"), (NULL)); return GST_FLOW_ERROR; } } while (0) -#define ADVANCE(x) do { guint16 _ = (x); ptr += (_); sz -= (_); } while (0) -#define IGNORE(x) do { guint16 __ = (x); CHECK (__); ADVANCE (__); } while (0) +#define CHECK(x) G_STMT_START { \ + guint16 _ = (x); \ + if (G_UNLIKELY((_) > sz)) { \ + GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), ("Read outside buffer")); \ + return GST_FLOW_ERROR; \ + } \ + } G_STMT_END +#define ADVANCE(x) G_STMT_START { \ + guint16 _ = (x); ptr += (_); sz -= (_); \ + } G_STMT_END +#define IGNORE(x) G_STMT_START { \ + guint16 __ = (x); \ + CHECK (__); \ + ADVANCE (__); \ + } G_STMT_END static GstFlowReturn gst_kate_spu_decode_command_sequence (GstKateEnc * ke, GstBuffer * buf, |