diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 2c40c32b70..6aadc42125 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -898,7 +898,7 @@ gst_file_src_create (GstBaseSrc * basesrc, guint64 offset, guint length, GstFileSrc *src; GstFlowReturn ret; - src = GST_FILE_SRC (basesrc); + src = GST_FILE_SRC_CAST (basesrc); #ifdef HAVE_MMAP if (src->using_mmap) { diff --git a/plugins/elements/gstfilesrc.h b/plugins/elements/gstfilesrc.h index 3a3eee7c33..dbd6fe45fe 100644 --- a/plugins/elements/gstfilesrc.h +++ b/plugins/elements/gstfilesrc.h @@ -41,6 +41,7 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FILE_SRC)) #define GST_IS_FILE_SRC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FILE_SRC)) +#define GST_FILE_SRC_CAST(obj) ((GstFileSrc*) obj) typedef struct _GstFileSrc GstFileSrc; typedef struct _GstFileSrcClass GstFileSrcClass;