gst/playback/gstdecodebin.c: make sure the facotries are ordered the same every time even if they have the same rank ...

Original commit message from CVS:
* gst/playback/gstdecodebin.c: (compare_ranks):
make sure the facotries are ordered the same every time even if they
have the same rank by using the name
* gst/playback/gstdecodebin.c: (find_compatibles):
make sure we don't add factories to the list twice
This commit is contained in:
Benjamin Otte 2004-12-17 17:02:53 +00:00
parent a3d48eda72
commit d8ba6f1f3b
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2004-12-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/playback/gstdecodebin.c: (compare_ranks):
make sure the facotries are ordered the same every time even if they
have the same rank by using the name
* gst/playback/gstdecodebin.c: (find_compatibles):
make sure we don't add factories to the list twice
2004-12-16 David Schleef <ds@schleef.org>
* configure.ac: look for musepack headers as musepack/*.h

View file

@ -259,7 +259,13 @@ gst_decode_bin_factory_filter (GstPluginFeature * feature,
static gint
compare_ranks (GstPluginFeature * f1, GstPluginFeature * f2)
{
return gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1);
gint diff;
diff = gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1);
if (diff != 0)
return diff;
return strcmp (gst_plugin_feature_get_name (f2),
gst_plugin_feature_get_name (f1));
}
static void
@ -364,6 +370,8 @@ find_compatibles (GstDecodeBin * decode_bin, const GstCaps * caps)
if (!gst_caps_is_empty (intersect)) {
/* non empty intersection, we can use this element */
to_try = g_list_append (to_try, factory);
gst_caps_free (intersect);
break;
}
gst_caps_free (intersect);
}