intersubsink/src: Free channel string when finalizing the instance
This commit is contained in:
parent
b02cbcfa42
commit
c15458b8cb
@ -53,6 +53,7 @@ static void gst_inter_sub_sink_set_property (GObject * object,
|
|||||||
guint property_id, const GValue * value, GParamSpec * pspec);
|
guint property_id, const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_inter_sub_sink_get_property (GObject * object,
|
static void gst_inter_sub_sink_get_property (GObject * object,
|
||||||
guint property_id, GValue * value, GParamSpec * pspec);
|
guint property_id, GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_inter_sub_sink_finalize (GObject * object);
|
||||||
|
|
||||||
static void gst_inter_sub_sink_get_times (GstBaseSink * sink,
|
static void gst_inter_sub_sink_get_times (GstBaseSink * sink,
|
||||||
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
|
GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
|
||||||
@ -78,7 +79,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||||||
|
|
||||||
|
|
||||||
/* class initialization */
|
/* class initialization */
|
||||||
|
#define parent_class gst_inter_sub_sink_parent_class
|
||||||
G_DEFINE_TYPE (GstInterSubSink, gst_inter_sub_sink, GST_TYPE_BASE_SINK);
|
G_DEFINE_TYPE (GstInterSubSink, gst_inter_sub_sink, GST_TYPE_BASE_SINK);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -102,6 +103,7 @@ gst_inter_sub_sink_class_init (GstInterSubSinkClass * klass)
|
|||||||
|
|
||||||
gobject_class->set_property = gst_inter_sub_sink_set_property;
|
gobject_class->set_property = gst_inter_sub_sink_set_property;
|
||||||
gobject_class->get_property = gst_inter_sub_sink_get_property;
|
gobject_class->get_property = gst_inter_sub_sink_get_property;
|
||||||
|
gobject_class->finalize = gst_inter_sub_sink_finalize;
|
||||||
base_sink_class->get_times = GST_DEBUG_FUNCPTR (gst_inter_sub_sink_get_times);
|
base_sink_class->get_times = GST_DEBUG_FUNCPTR (gst_inter_sub_sink_get_times);
|
||||||
base_sink_class->start = GST_DEBUG_FUNCPTR (gst_inter_sub_sink_start);
|
base_sink_class->start = GST_DEBUG_FUNCPTR (gst_inter_sub_sink_start);
|
||||||
base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_inter_sub_sink_stop);
|
base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_inter_sub_sink_stop);
|
||||||
@ -117,7 +119,6 @@ gst_inter_sub_sink_class_init (GstInterSubSinkClass * klass)
|
|||||||
static void
|
static void
|
||||||
gst_inter_sub_sink_init (GstInterSubSink * intersubsink)
|
gst_inter_sub_sink_init (GstInterSubSink * intersubsink)
|
||||||
{
|
{
|
||||||
|
|
||||||
intersubsink->channel = g_strdup ("default");
|
intersubsink->channel = g_strdup ("default");
|
||||||
|
|
||||||
intersubsink->fps_n = 1;
|
intersubsink->fps_n = 1;
|
||||||
@ -157,6 +158,18 @@ gst_inter_sub_sink_get_property (GObject * object, guint property_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_inter_sub_sink_finalize (GObject * object)
|
||||||
|
{
|
||||||
|
GstInterSubSink *intersubsink = GST_INTER_SUB_SINK (object);
|
||||||
|
|
||||||
|
g_free (intersubsink->channel);
|
||||||
|
intersubsink->channel = NULL;
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_inter_sub_sink_get_times (GstBaseSink * sink, GstBuffer * buffer,
|
gst_inter_sub_sink_get_times (GstBaseSink * sink, GstBuffer * buffer,
|
||||||
GstClockTime * start, GstClockTime * end)
|
GstClockTime * start, GstClockTime * end)
|
||||||
|
@ -54,6 +54,7 @@ static void gst_inter_sub_src_set_property (GObject * object,
|
|||||||
guint property_id, const GValue * value, GParamSpec * pspec);
|
guint property_id, const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_inter_sub_src_get_property (GObject * object,
|
static void gst_inter_sub_src_get_property (GObject * object,
|
||||||
guint property_id, GValue * value, GParamSpec * pspec);
|
guint property_id, GValue * value, GParamSpec * pspec);
|
||||||
|
static void gst_inter_sub_src_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_inter_sub_src_start (GstBaseSrc * src);
|
static gboolean gst_inter_sub_src_start (GstBaseSrc * src);
|
||||||
static gboolean gst_inter_sub_src_stop (GstBaseSrc * src);
|
static gboolean gst_inter_sub_src_stop (GstBaseSrc * src);
|
||||||
@ -79,9 +80,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||||||
GST_STATIC_CAPS ("application/unknown")
|
GST_STATIC_CAPS ("application/unknown")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/* class initialization */
|
/* class initialization */
|
||||||
|
#define parent_class gst_inter_sub_src_parent_class
|
||||||
G_DEFINE_TYPE (GstInterSubSrc, gst_inter_sub_src, GST_TYPE_BASE_SRC);
|
G_DEFINE_TYPE (GstInterSubSrc, gst_inter_sub_src, GST_TYPE_BASE_SRC);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -105,6 +105,7 @@ gst_inter_sub_src_class_init (GstInterSubSrcClass * klass)
|
|||||||
|
|
||||||
gobject_class->set_property = gst_inter_sub_src_set_property;
|
gobject_class->set_property = gst_inter_sub_src_set_property;
|
||||||
gobject_class->get_property = gst_inter_sub_src_get_property;
|
gobject_class->get_property = gst_inter_sub_src_get_property;
|
||||||
|
gobject_class->finalize = gst_inter_sub_src_finalize;
|
||||||
base_src_class->start = GST_DEBUG_FUNCPTR (gst_inter_sub_src_start);
|
base_src_class->start = GST_DEBUG_FUNCPTR (gst_inter_sub_src_start);
|
||||||
base_src_class->stop = GST_DEBUG_FUNCPTR (gst_inter_sub_src_stop);
|
base_src_class->stop = GST_DEBUG_FUNCPTR (gst_inter_sub_src_stop);
|
||||||
base_src_class->get_times = GST_DEBUG_FUNCPTR (gst_inter_sub_src_get_times);
|
base_src_class->get_times = GST_DEBUG_FUNCPTR (gst_inter_sub_src_get_times);
|
||||||
@ -162,6 +163,16 @@ gst_inter_sub_src_get_property (GObject * object, guint property_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_inter_sub_src_finalize (GObject * object)
|
||||||
|
{
|
||||||
|
GstInterSubSrc *intersubsrc = GST_INTER_SUB_SRC (object);
|
||||||
|
|
||||||
|
g_free (intersubsrc->channel);
|
||||||
|
intersubsrc->channel = NULL;
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_inter_sub_src_start (GstBaseSrc * src)
|
gst_inter_sub_src_start (GstBaseSrc * src)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user