diff --git a/gst/gstelement.h b/gst/gstelement.h index 74a0e2ce9b..f0d23539ed 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -150,7 +150,7 @@ typedef enum { * Given a current state @cur and a target state @pending, calculate the next (intermediate) * #GstState. */ -#define GST_STATE_GET_NEXT(cur,pending) ((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur))) +#define GST_STATE_GET_NEXT(cur,pending) ((GstState)((cur) + __GST_SIGN ((gint)(pending) - (gint)(cur)))) /** * GST_STATE_TRANSITION: * @cur: A current state