cc708overlay: bump pango requirement and drop no longer required locking

Gets rid of GSlice allocation that's never freed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
This commit is contained in:
Tim-Philipp Müller 2023-01-25 00:33:33 +00:00 committed by GStreamer Marge Bot
parent 7679011d1d
commit d95d3e39af
3 changed files with 1 additions and 14 deletions

View file

@ -207,15 +207,9 @@ gst_base_cea_cc_overlay_base_init (gpointer g_class)
/* Only lock for the subclasses here, the base class
* doesn't have this mutex yet and it's not necessary
* here */
/* FIXME : Not needed anymore since pango 1.32.6 ! */
if (klass->pango_lock)
g_mutex_lock (klass->pango_lock);
fontmap = pango_cairo_font_map_get_default ();
klass->pango_context =
pango_font_map_create_context (PANGO_FONT_MAP (fontmap));
if (klass->pango_lock)
g_mutex_unlock (klass->pango_lock);
}
static void
@ -246,9 +240,6 @@ gst_base_cea_cc_overlay_class_init (GstCeaCcOverlayClass * klass)
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_cea_cc_overlay_change_state);
klass->pango_lock = g_slice_new (GMutex);
g_mutex_init (klass->pango_lock);
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SERVICE_NUMBER,
g_param_spec_int ("service-number", "service-number",
"Service number. Service 1 is designated as the Primary Caption Service,"
@ -524,14 +515,11 @@ gst_cea_cc_overlay_setcaps (GstCeaCcOverlay * overlay, GstCaps * caps)
ret = gst_cea_cc_overlay_negotiate (overlay, caps);
GST_CEA_CC_OVERLAY_LOCK (overlay);
g_mutex_lock (GST_CEA_CC_OVERLAY_GET_CLASS (overlay)->pango_lock);
if (!overlay->attach_compo_to_buffer &&
!gst_cea_cc_overlay_can_handle_caps (caps)) {
GST_DEBUG_OBJECT (overlay, "unsupported caps %" GST_PTR_FORMAT, caps);
ret = FALSE;
}
g_mutex_unlock (GST_CEA_CC_OVERLAY_GET_CLASS (overlay)->pango_lock);
GST_CEA_CC_OVERLAY_UNLOCK (overlay);
return ret;

View file

@ -127,7 +127,6 @@ struct _GstCeaCcOverlayClass
GstElementClass parent_class;
PangoContext *pango_context;
GMutex *pango_lock;
};
GType gst_cea_cc_overlay_get_type (void);

View file

@ -1,4 +1,4 @@
closedcaption_dep = dependency('pangocairo', version : '>= 1.22.0',
closedcaption_dep = dependency('pangocairo', version : '>= 1.32.6',
required : get_option('closedcaption'))
zvbi_sources = [