mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
[845/906] filter: handle capsfeatures properly
This commit is contained in:
parent
2cb2a3951b
commit
4b8019b12c
1 changed files with 6 additions and 2 deletions
|
@ -655,6 +655,7 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
|
|||
{
|
||||
//GstGLFilter* filter = GST_GL_FILTER (bt);
|
||||
GstStructure *structure;
|
||||
GstCapsFeatures *features;
|
||||
GstCaps *newcaps, *result;
|
||||
const GValue *par;
|
||||
guint i, n;
|
||||
|
@ -665,11 +666,14 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
|
|||
|
||||
for (i = 0; i < n; i++) {
|
||||
structure = gst_caps_get_structure (caps, i);
|
||||
features = gst_caps_get_features (caps, i);
|
||||
|
||||
if (i > 0 && gst_caps_is_subset_structure (newcaps, structure))
|
||||
if (i > 0
|
||||
&& gst_caps_is_subset_structure_full (newcaps, structure, features))
|
||||
continue;
|
||||
|
||||
structure = gst_structure_copy (structure);
|
||||
features = gst_caps_features_copy (features);
|
||||
|
||||
gst_structure_set (structure,
|
||||
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
|
||||
|
@ -683,7 +687,7 @@ gst_gl_filter_transform_caps (GstBaseTransform * bt,
|
|||
NULL);
|
||||
}
|
||||
|
||||
gst_caps_append_structure (newcaps, structure);
|
||||
gst_caps_append_structure_full (newcaps, structure, features);
|
||||
}
|
||||
|
||||
if (filter) {
|
||||
|
|
Loading…
Reference in a new issue