gst/gstelement.h: Add casts to the correct return type to state <=> state transition...
authorTim-Philipp Müller <tim@centricular.net>
Mon, 16 Oct 2006 20:02:38 +0000 (20:02 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 16 Oct 2006 20:02:38 +0000 (20:02 +0000)
Original commit message from CVS:
* gst/gstelement.h:
Add casts to the correct return type to state <=> state transition
macros.

ChangeLog
gst/gstelement.h

index 82763db..638e50b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-16  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/gstelement.h:
+         Add casts to the correct return type to state <=> state transition
+         macros.
+
 2006-10-16  Stefan Kost  <ensonic@users.sf.net>
 
        * docs/design/part-live-source.txt:
index fec28ed..30a499d 100644 (file)
@@ -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: