mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
kate: break up macros into multiple lines
This commit is contained in:
parent
aaed93e126
commit
a20d86f1f5
1 changed files with 15 additions and 4 deletions
|
@ -253,10 +253,21 @@ gst_kate_spu_crop_bitmap (GstKateEnc * ke, kate_bitmap * kb, guint16 * dx,
|
||||||
kb->height = h;
|
kb->height = h;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: fix macros */
|
#define CHECK(x) G_STMT_START { \
|
||||||
#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)
|
guint16 _ = (x); \
|
||||||
#define ADVANCE(x) do { guint16 _ = (x); ptr += (_); sz -= (_); } while (0)
|
if (G_UNLIKELY((_) > sz)) { \
|
||||||
#define IGNORE(x) do { guint16 __ = (x); CHECK (__); ADVANCE (__); } while (0)
|
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
|
static GstFlowReturn
|
||||||
gst_kate_spu_decode_command_sequence (GstKateEnc * ke, GstBuffer * buf,
|
gst_kate_spu_decode_command_sequence (GstKateEnc * ke, GstBuffer * buf,
|
||||||
|
|
Loading…
Reference in a new issue