diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-03-19 20:41:16 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-03-21 10:19:49 +0100 |
commit | 226f23eddeeadeb982e72977f00ce9fdf0ac5e7a (patch) | |
tree | 1169375a0d037ba62d6c19fce491aa595c32e440 | |
parent | b409f71f4950f88dfc1f7590dbab41ef07168b39 (diff) | |
download | gst-plugins-bad-226f23eddeeadeb982e72977f00ce9fdf0ac5e7a.tar.gz gst-plugins-bad-226f23eddeeadeb982e72977f00ce9fdf0ac5e7a.tar.bz2 gst-plugins-bad-226f23eddeeadeb982e72977f00ce9fdf0ac5e7a.zip |
mxf: Optimize mxf_ul_is_subclass() a bit
-rw-r--r-- | gst/mxf/mxful.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/gst/mxf/mxful.c b/gst/mxf/mxful.c index b88b2ff2..37624c53 100644 --- a/gst/mxf/mxful.c +++ b/gst/mxf/mxful.c @@ -89,7 +89,7 @@ mxf_ul_is_equal (const MXFUL * a, const MXFUL * b) gboolean mxf_ul_is_subclass (const MXFUL * class, const MXFUL * subclass) { - guint i, j; + guint i; g_return_val_if_fail (class != NULL, FALSE); g_return_val_if_fail (subclass != NULL, FALSE); @@ -99,23 +99,7 @@ mxf_ul_is_subclass (const MXFUL * class, const MXFUL * subclass) /* registry version */ continue; - if (class->u[i] == 0x00) { - gboolean terminated = TRUE; - - for (j = i; j < 16; j++) { - if (class->u[j] != 0x00) { - terminated = FALSE; - break; - } - } - - if (terminated) - return TRUE; - - continue; - } - - if (class->u[i] != subclass->u[i]) + if (class->u[i] != 0x00 && class->u[i] != subclass->u[i]) return FALSE; } |