summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2013-04-18 12:07:37 +0300
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-04-18 13:59:52 +0200
commit9c94a1812f7cc99cc4134d6abb9b0c2998f1a80f (patch)
tree6c9bcc34238240c613235612155cc7361758a1a8
parent8cf604964327abc18e9da7a999b783f3c34f547b (diff)
playbin: use _plugin_feature_rank_compare API instead of duplicating the code.
-rw-r--r--gst/playback/gstplaybin2.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index d21361440..0d473879e 100644
--- a/gst/playback/gstplaybin2.c
+++ b/gst/playback/gstplaybin2.c
@@ -1293,7 +1293,6 @@ static gint
compare_factories_func (gconstpointer p1, gconstpointer p2)
{
GstPluginFeature *f1, *f2;
- gint diff;
gboolean is_sink1, is_sink2;
gboolean is_parser1, is_parser2;
@@ -1325,13 +1324,7 @@ compare_factories_func (gconstpointer p1, gconstpointer p2)
/* And if it's a both a parser or sink we first sort by rank
* and then by factory name */
- diff = gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1);
- if (diff != 0)
- return diff;
-
- diff = strcmp (GST_OBJECT_NAME (f1), GST_OBJECT_NAME (f2));
-
- return diff;
+ return gst_plugin_feature_rank_compare_func (p1, p2);
}
/* Must be called with elements lock! */