From 854bc55a2ed67968852a57249195b79b6362c82b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 16 Oct 2006 20:02:38 +0000 Subject: [PATCH] gst/gstelement.h: Add casts to the correct return type to state <=> state transition macros. Original commit message from CVS: * gst/gstelement.h: Add casts to the correct return type to state <=> state transition macros. --- ChangeLog | 6 ++++++ gst/gstelement.h | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82763db..638e50b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-16 Tim-Philipp Müller + + * gst/gstelement.h: + Add casts to the correct return type to state <=> state transition + macros. + 2006-10-16 Stefan Kost * docs/design/part-live-source.txt: diff --git a/gst/gstelement.h b/gst/gstelement.h index fec28ed..30a499d 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -145,21 +145,21 @@ typedef enum { * Given a current state @cur and a next state @next, calculate the associated * #GstStateChange transition. */ -#define GST_STATE_TRANSITION(cur,next) (((cur)<<3)|(next)) +#define GST_STATE_TRANSITION(cur,next) ((GstStateChange)(((cur)<<3)|(next))) /** * GST_STATE_TRANSITION_CURRENT: * @trans: A #GstStateChange * * Given a state transition @trans, extract the current #GstState. */ -#define GST_STATE_TRANSITION_CURRENT(trans) ((trans)>>3) +#define GST_STATE_TRANSITION_CURRENT(trans) ((GstState)((trans)>>3)) /** * GST_STATE_TRANSITION_NEXT: * @trans: A #GstStateChange * * Given a state transition @trans, extract the next #GstState. */ -#define GST_STATE_TRANSITION_NEXT(trans) ((trans)&0x7) +#define GST_STATE_TRANSITION_NEXT(trans) ((GstState)((trans)&0x7)) /** * GstStateChange: -- 2.7.4