summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux/qtdemux_types.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-04-30 18:41:44 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-04-30 18:41:44 +0200
commitab0d1bc942447cb4bd02be606ef6e7629c97c9a7 (patch)
treecd38eade180d8dc24e68a4a52f62a2c1265f6ef7 /gst/qtdemux/qtdemux_types.c
parentb5d84439fd63e47f54fcbd281cd9f9aa89e756d0 (diff)
qtdemux: micro optimize qtdemux a little
Sprinkle some G_LIKELY around. Avoid traversing and dumping the tree when debugging is not activated.
Diffstat (limited to 'gst/qtdemux/qtdemux_types.c')
-rw-r--r--gst/qtdemux/qtdemux_types.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/qtdemux/qtdemux_types.c b/gst/qtdemux/qtdemux_types.c
index d2b7e5a7..ef79d1d2 100644
--- a/gst/qtdemux/qtdemux_types.c
+++ b/gst/qtdemux/qtdemux_types.c
@@ -146,11 +146,12 @@ qtdemux_type_get (guint32 fourcc)
int i;
for (i = 0; i < n_qt_node_types; i++) {
- if (qt_node_types[i].fourcc == fourcc)
+ if (G_UNLIKELY (qt_node_types[i].fourcc == fourcc))
return qt_node_types + i;
}
GST_WARNING ("unknown QuickTime node type %" GST_FOURCC_FORMAT,
GST_FOURCC_ARGS (fourcc));
+
return qt_node_types + n_qt_node_types - 1;
}