Skip to content

Commit

Permalink
v4l2src: Add GstImxV4l2Meta init function
Browse files Browse the repository at this point in the history
This avoids the g_assert() that was caused by the missing init function

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
  • Loading branch information
dv1 committed Oct 5, 2017
1 parent c3971b7 commit e088f41
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/v4l2src/v4l2_buffer_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ GType gst_imx_v4l2_meta_api_get_type(void)
return type;
}

static gboolean gst_imx_v4l2_meta_init(GstMeta *meta, G_GNUC_UNUSED gpointer params, G_GNUC_UNUSED GstBuffer *buffer)
{
GstImxV4l2Meta *v4l2meta = (GstImxV4l2Meta *)meta;
v4l2meta->mem = NULL;
return TRUE;
}

const GstMetaInfo *gst_imx_v4l2_meta_get_info(void)
{
static const GstMetaInfo *meta_info = NULL;
Expand All @@ -52,7 +59,7 @@ const GstMetaInfo *gst_imx_v4l2_meta_get_info(void)
gst_imx_v4l2_meta_api_get_type(),
"GstImxV4l2Meta",
sizeof(GstImxV4l2Meta),
(GstMetaInitFunction)NULL,
(GstMetaInitFunction)gst_imx_v4l2_meta_init,
(GstMetaFreeFunction)NULL,
(GstMetaTransformFunction)NULL);
g_once_init_leave(&meta_info, meta);
Expand Down

0 comments on commit e088f41

Please sign in to comment.