dwritetimeoverlay: Fix member variable initialization

Use GstBaseTransform::start() instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4929>
This commit is contained in:
Seungha Yang 2023-06-24 01:43:50 +09:00 committed by GStreamer Marge Bot
parent 8c628fa325
commit 37c7c92c03
2 changed files with 5 additions and 7 deletions

View file

@ -57,8 +57,6 @@ struct _GstDWriteBaseOverlayClass
gboolean (*sink_event) (GstDWriteBaseOverlay * overlay,
GstEvent * event);
gboolean (*start) (GstDWriteBaseOverlay * overlay);
WString (*get_text) (GstDWriteBaseOverlay * overlay,
const std::wstring & default_text,
GstBuffer * buffer);

View file

@ -129,7 +129,7 @@ static void gst_dwrite_time_overlay_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static gboolean gst_dwrite_time_overlay_sink_event (GstBaseTransform * trans,
GstEvent * event);
static gboolean gst_dwrite_time_overlay_start (GstDWriteBaseOverlay * overlay);
static gboolean gst_dwrite_time_overlay_start (GstBaseTransform * overlay);
static WString gst_dwrite_time_overlay_get_text (GstDWriteBaseOverlay * overlay,
const WString & default_text, GstBuffer * buffer);
@ -185,7 +185,7 @@ gst_dwrite_time_overlay_class_init (GstDWriteTimeOverlayClass * klass)
trans_class->sink_event =
GST_DEBUG_FUNCPTR (gst_dwrite_time_overlay_sink_event);
overlay_class->start = GST_DEBUG_FUNCPTR (gst_dwrite_time_overlay_start);
trans_class->start = GST_DEBUG_FUNCPTR (gst_dwrite_time_overlay_start);
overlay_class->get_text =
GST_DEBUG_FUNCPTR (gst_dwrite_time_overlay_get_text);
@ -284,15 +284,15 @@ gst_dwrite_time_overlay_get_property (GObject * object, guint prop_id,
}
static gboolean
gst_dwrite_time_overlay_start (GstDWriteBaseOverlay * overlay)
gst_dwrite_time_overlay_start (GstBaseTransform * trans)
{
GstDWriteTimeOverlay *self = GST_DWRITE_TIME_OVERLAY (overlay);
GstDWriteTimeOverlay *self = GST_DWRITE_TIME_OVERLAY (trans);
GstDWriteTimeOverlayPrivate *priv = self->priv;
priv->first_running_time = GST_CLOCK_TIME_NONE;
priv->buffer_count = 0;
return TRUE;
return GST_BASE_TRANSFORM_CLASS (parent_class)->start (trans);
}
static gboolean