[gst-devel] Re: [gst-cvs] company gstreamer: gstreamer/ gstreamer/gst/

David I. Lehn dlehn at vt.edu
Wed Jan 14 21:21:00 CET 2004


* Benjamin Otte <company at pdx.freedesktop.org> [2004-01-14T22:05:39-0500]:
> Index: gstelement.h
> ===================================================================
> RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v
> retrieving revision 1.145
> retrieving revision 1.146
> diff -u -d -r1.145 -r1.146
> --- gstelement.h	14 Jan 2004 00:46:47 -0000	1.145
> +++ gstelement.h	15 Jan 2004 03:03:15 -0000	1.146
> @@ -218,6 +218,7 @@
>  		  				 GstFormat *format, gint64 *value);
>  
>    /* change the element state */
> +  GstElementStateReturn	(*initiate_state_change)(GstElement *element, GstElementState state);
>    GstElementStateReturn (*change_state)		(GstElement *element);
>  
>    /* request/release pads */
> @@ -232,7 +233,7 @@
>    GstIndex*		(*get_index)		(GstElement *element);
>    void			(*set_index)		(GstElement *element, GstIndex *index);
>  
> -  gpointer _gst_reserved[GST_PADDING];
> +  gpointer _gst_reserved[GST_PADDING - 1];
>  };
>  

This isn't quite right.  To maintain backwards compatibility the new
pointer has to be at the end of the struct right where the old padding
pointer was.  Else code compiled with the old version will have the
wrong offsets for all the structure components at and below
initiate_state_change.

-dave




More information about the gstreamer-devel mailing list