From c45b9d4aef1565d4b6d2f566ef1dfcb8d0b0e347 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 6 Sep 2010 11:44:17 +0300 Subject: [PATCH] playback: ref the selector pad class inside input-selector Minimizes the delta to original element in -bad and allows us to keep the type static. --- gst/playback/gstinputselector.c | 5 ++++- gst/playback/gstinputselector.h | 1 - gst/playback/gstplaybin2.c | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/playback/gstinputselector.c b/gst/playback/gstinputselector.c index 5ce5c33135..cb76202b23 100644 --- a/gst/playback/gstinputselector.c +++ b/gst/playback/gstinputselector.c @@ -146,7 +146,7 @@ static GstFlowReturn gst_selector_pad_chain (GstPad * pad, GstBuffer * buf); static GstFlowReturn gst_selector_pad_bufferalloc (GstPad * pad, guint64 offset, guint size, GstCaps * caps, GstBuffer ** buf); -GType +static GType gst_selector_pad_get_type (void) { static GType selector_pad_type = 0; @@ -758,6 +758,9 @@ gst_input_selector_class_init (GstInputSelectorClass * klass) parent_class = g_type_class_peek_parent (klass); + /* FIXME: remove after confirming it is safe now */ + g_type_class_ref (gst_selector_pad_get_type ()); + gobject_class->dispose = gst_input_selector_dispose; gobject_class->set_property = gst_input_selector_set_property; diff --git a/gst/playback/gstinputselector.h b/gst/playback/gstinputselector.h index 83e0e54146..58a671d50c 100644 --- a/gst/playback/gstinputselector.h +++ b/gst/playback/gstinputselector.h @@ -78,7 +78,6 @@ struct _GstInputSelectorClass { }; GType gst_input_selector_get_type (void); -GType gst_selector_pad_get_type (void); G_END_DECLS diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 558b30018b..f1d5f8879c 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -3552,7 +3552,6 @@ gst_play_bin2_plugin_init (GstPlugin * plugin) GST_DEBUG_CATEGORY_INIT (gst_play_bin_debug, "playbin2", 0, "play bin"); g_type_class_ref (gst_input_selector_get_type ()); - g_type_class_ref (gst_selector_pad_get_type ()); return gst_element_register (plugin, "playbin2", GST_RANK_NONE, GST_TYPE_PLAY_BIN);