It might be the case that glgsinkbin would try to set a property to
its internal sink which doesn't exist in it, leading to a glib's
warning. For example, when playsink sets 'force-aspect-ratio' property
and glsinkbin has, as internal sink, appsink, which doesn't handle
that property.
The patch validates the incoming property to forward to internal sink
if it exists in the internal sink and both properties has the same
type.
const GValue * value, GParamSpec * pspec)
{
GstGLSinkBin *self = GST_GL_SINK_BIN (object);
+ GParamSpec *sink_pspec;
switch (prop_id) {
case PROP_SINK:
g_object_set_property (G_OBJECT (self->balance), pspec->name, value);
break;
default:
- if (self->sink)
- g_object_set_property (G_OBJECT (self->sink), pspec->name, value);
+ if (self->sink) {
+ sink_pspec =
+ g_object_class_find_property (G_OBJECT_GET_CLASS (self->sink),
+ pspec->name);
+ if (sink_pspec
+ && G_PARAM_SPEC_TYPE (sink_pspec) == G_PARAM_SPEC_TYPE (pspec)) {
+ g_object_set_property (G_OBJECT (self->sink), pspec->name, value);
+ } else {
+ GST_INFO ("Failed to set unmatched property %s", pspec->name);
+ }
+ }
break;
}
}