mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
gst/gstvalue.c: Optimisation: bail out of the loop as early as possible (#500143).
Original commit message from CVS: Based on patch by: Laurent Glayal <spglegle yahoo fr> * gst/gstvalue.c: (gst_value_is_fixed): Optimisation: bail out of the loop as early as possible (#500143).
This commit is contained in:
parent
5cb869bfdf
commit
c2683ff751
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-12-28 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
Based on patch by: Laurent Glayal <spglegle yahoo fr>
|
||||
|
||||
* gst/gstvalue.c: (gst_value_is_fixed):
|
||||
Optimisation: bail out of the loop as early as possible (#500143).
|
||||
|
||||
2007-12-28 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/gstcaps.c: (gst_caps_to_string):
|
||||
|
|
|
@ -3330,7 +3330,6 @@ gst_value_is_fixed (const GValue * value)
|
|||
GType type = G_VALUE_TYPE (value);
|
||||
|
||||
if (type == GST_TYPE_ARRAY) {
|
||||
gboolean fixed = TRUE;
|
||||
gint size, n;
|
||||
const GValue *kid;
|
||||
|
||||
|
@ -3338,10 +3337,10 @@ gst_value_is_fixed (const GValue * value)
|
|||
size = gst_value_array_get_size (value);
|
||||
for (n = 0; n < size; n++) {
|
||||
kid = gst_value_array_get_value (value, n);
|
||||
fixed &= gst_value_is_fixed (kid);
|
||||
if (!gst_value_is_fixed (kid))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return fixed;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return gst_type_is_fixed (type);
|
||||
|
|
Loading…
Reference in a new issue