mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 19:18:31 +00:00
gst/base/gstbasesink.c: Don't free preroll queue too early.
Original commit message from CVS: * gst/base/gstbasesink.c: (gst_basesink_class_init), (gst_basesink_init), (gst_basesink_finalize), (gst_basesink_activate), (gst_basesink_change_state): Don't free preroll queue too early.
This commit is contained in:
parent
1b2ade5361
commit
637c74bdb8
3 changed files with 37 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-05-19 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/base/gstbasesink.c: (gst_basesink_class_init),
|
||||||
|
(gst_basesink_init), (gst_basesink_finalize),
|
||||||
|
(gst_basesink_activate), (gst_basesink_change_state):
|
||||||
|
Don't free preroll queue too early.
|
||||||
|
|
||||||
2005-05-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2005-05-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* gst/Makefile.am:
|
* gst/Makefile.am:
|
||||||
|
|
|
@ -62,6 +62,7 @@ static GstElementClass *parent_class = NULL;
|
||||||
static void gst_basesink_base_init (gpointer g_class);
|
static void gst_basesink_base_init (gpointer g_class);
|
||||||
static void gst_basesink_class_init (GstBaseSinkClass * klass);
|
static void gst_basesink_class_init (GstBaseSinkClass * klass);
|
||||||
static void gst_basesink_init (GstBaseSink * trans, gpointer g_class);
|
static void gst_basesink_init (GstBaseSink * trans, gpointer g_class);
|
||||||
|
static void gst_basesink_finalize (GObject * object);
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gst_basesink_get_type (void)
|
gst_basesink_get_type (void)
|
||||||
|
@ -130,6 +131,7 @@ gst_basesink_class_init (GstBaseSinkClass * klass)
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
|
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_basesink_finalize);
|
||||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_basesink_set_property);
|
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_basesink_set_property);
|
||||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_basesink_get_property);
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_basesink_get_property);
|
||||||
|
|
||||||
|
@ -238,10 +240,23 @@ gst_basesink_init (GstBaseSink * basesink, gpointer g_class)
|
||||||
|
|
||||||
basesink->pad_mode = GST_ACTIVATE_NONE;
|
basesink->pad_mode = GST_ACTIVATE_NONE;
|
||||||
GST_RPAD_TASK (basesink->sinkpad) = NULL;
|
GST_RPAD_TASK (basesink->sinkpad) = NULL;
|
||||||
|
basesink->preroll_queue = g_queue_new ();
|
||||||
|
|
||||||
GST_FLAG_SET (basesink, GST_ELEMENT_IS_SINK);
|
GST_FLAG_SET (basesink, GST_ELEMENT_IS_SINK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_basesink_finalize (GObject * object)
|
||||||
|
{
|
||||||
|
GstBaseSink *basesink;
|
||||||
|
|
||||||
|
basesink = GST_BASESINK (object);
|
||||||
|
|
||||||
|
g_queue_free (basesink->preroll_queue);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_basesink_set_pad_functions (GstBaseSink * this, GstPad * pad)
|
gst_basesink_set_pad_functions (GstBaseSink * this, GstPad * pad)
|
||||||
{
|
{
|
||||||
|
@ -835,7 +850,6 @@ gst_basesink_change_state (GstElement * element)
|
||||||
* is no data flow in READY so we can safely assume we need to preroll. */
|
* is no data flow in READY so we can safely assume we need to preroll. */
|
||||||
basesink->offset = 0;
|
basesink->offset = 0;
|
||||||
GST_PREROLL_LOCK (basesink->sinkpad);
|
GST_PREROLL_LOCK (basesink->sinkpad);
|
||||||
basesink->preroll_queue = g_queue_new ();
|
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
basesink->have_preroll = FALSE;
|
basesink->have_preroll = FALSE;
|
||||||
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
||||||
|
@ -889,8 +903,6 @@ gst_basesink_change_state (GstElement * element)
|
||||||
GST_PREROLL_LOCK (basesink->sinkpad);
|
GST_PREROLL_LOCK (basesink->sinkpad);
|
||||||
|
|
||||||
gst_basesink_preroll_queue_flush (basesink);
|
gst_basesink_preroll_queue_flush (basesink);
|
||||||
g_queue_free (basesink->preroll_queue);
|
|
||||||
basesink->preroll_queue = NULL;
|
|
||||||
|
|
||||||
if (basesink->have_preroll)
|
if (basesink->have_preroll)
|
||||||
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
||||||
|
|
|
@ -62,6 +62,7 @@ static GstElementClass *parent_class = NULL;
|
||||||
static void gst_basesink_base_init (gpointer g_class);
|
static void gst_basesink_base_init (gpointer g_class);
|
||||||
static void gst_basesink_class_init (GstBaseSinkClass * klass);
|
static void gst_basesink_class_init (GstBaseSinkClass * klass);
|
||||||
static void gst_basesink_init (GstBaseSink * trans, gpointer g_class);
|
static void gst_basesink_init (GstBaseSink * trans, gpointer g_class);
|
||||||
|
static void gst_basesink_finalize (GObject * object);
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gst_basesink_get_type (void)
|
gst_basesink_get_type (void)
|
||||||
|
@ -130,6 +131,7 @@ gst_basesink_class_init (GstBaseSinkClass * klass)
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
||||||
|
|
||||||
|
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_basesink_finalize);
|
||||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_basesink_set_property);
|
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_basesink_set_property);
|
||||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_basesink_get_property);
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_basesink_get_property);
|
||||||
|
|
||||||
|
@ -238,10 +240,23 @@ gst_basesink_init (GstBaseSink * basesink, gpointer g_class)
|
||||||
|
|
||||||
basesink->pad_mode = GST_ACTIVATE_NONE;
|
basesink->pad_mode = GST_ACTIVATE_NONE;
|
||||||
GST_RPAD_TASK (basesink->sinkpad) = NULL;
|
GST_RPAD_TASK (basesink->sinkpad) = NULL;
|
||||||
|
basesink->preroll_queue = g_queue_new ();
|
||||||
|
|
||||||
GST_FLAG_SET (basesink, GST_ELEMENT_IS_SINK);
|
GST_FLAG_SET (basesink, GST_ELEMENT_IS_SINK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_basesink_finalize (GObject * object)
|
||||||
|
{
|
||||||
|
GstBaseSink *basesink;
|
||||||
|
|
||||||
|
basesink = GST_BASESINK (object);
|
||||||
|
|
||||||
|
g_queue_free (basesink->preroll_queue);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_basesink_set_pad_functions (GstBaseSink * this, GstPad * pad)
|
gst_basesink_set_pad_functions (GstBaseSink * this, GstPad * pad)
|
||||||
{
|
{
|
||||||
|
@ -835,7 +850,6 @@ gst_basesink_change_state (GstElement * element)
|
||||||
* is no data flow in READY so we can safely assume we need to preroll. */
|
* is no data flow in READY so we can safely assume we need to preroll. */
|
||||||
basesink->offset = 0;
|
basesink->offset = 0;
|
||||||
GST_PREROLL_LOCK (basesink->sinkpad);
|
GST_PREROLL_LOCK (basesink->sinkpad);
|
||||||
basesink->preroll_queue = g_queue_new ();
|
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
basesink->have_preroll = FALSE;
|
basesink->have_preroll = FALSE;
|
||||||
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
||||||
|
@ -889,8 +903,6 @@ gst_basesink_change_state (GstElement * element)
|
||||||
GST_PREROLL_LOCK (basesink->sinkpad);
|
GST_PREROLL_LOCK (basesink->sinkpad);
|
||||||
|
|
||||||
gst_basesink_preroll_queue_flush (basesink);
|
gst_basesink_preroll_queue_flush (basesink);
|
||||||
g_queue_free (basesink->preroll_queue);
|
|
||||||
basesink->preroll_queue = NULL;
|
|
||||||
|
|
||||||
if (basesink->have_preroll)
|
if (basesink->have_preroll)
|
||||||
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
||||||
|
|
Loading…
Reference in a new issue