Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GStreamer
gstreamer
Commits
4cdddd2b
Commit
4cdddd2b
authored
Mar 12, 2012
by
Wim Taymans
Browse files
caps: shortcut simplify earlier
A simple caps is already simplified, no need to check for fixedness.
parent
f4aa1b10
Changes
1
Hide whitespace changes
Inline
Side-by-side
gst/gstcaps.c
View file @
4cdddd2b
...
@@ -1774,14 +1774,15 @@ gst_caps_simplify (GstCaps * caps)
...
@@ -1774,14 +1774,15 @@ gst_caps_simplify (GstCaps * caps)
g_return_val_if_fail
(
GST_IS_CAPS
(
caps
),
NULL
);
g_return_val_if_fail
(
GST_IS_CAPS
(
caps
),
NULL
);
if
(
gst_caps_is_fixed
(
caps
))
start
=
GST_CAPS_LEN
(
caps
)
-
1
;
/* one caps, already as simple as can be */
if
(
start
==
0
)
return
caps
;
return
caps
;
caps
=
gst_caps_make_writable
(
caps
);
caps
=
gst_caps_make_writable
(
caps
);
g_ptr_array_sort
(
GST_CAPS_ARRAY
(
caps
),
gst_caps_compare_structures
);
g_ptr_array_sort
(
GST_CAPS_ARRAY
(
caps
),
gst_caps_compare_structures
);
start
=
GST_CAPS_LEN
(
caps
)
-
1
;
for
(
i
=
start
;
i
>=
0
;
i
--
)
{
for
(
i
=
start
;
i
>=
0
;
i
--
)
{
simplify
=
gst_caps_get_structure_unchecked
(
caps
,
i
);
simplify
=
gst_caps_get_structure_unchecked
(
caps
,
i
);
compare
=
gst_caps_get_structure_unchecked
(
caps
,
start
);
compare
=
gst_caps_get_structure_unchecked
(
caps
,
start
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment