GNOME Bugzilla – Bug 697990
pluginfeature: Fix the GstPluginFeature name comparison.
Last modified: 2013-04-15 10:05:59 UTC
Created attachment 241491 [details] [review] gstpluginfeature: Fix the GstPluginFeature name comparison. The comment description of gst_plugin_feature_rank_compare_func() says that it should return negative value if "the ranks are equal but the name of p1 comes before the name of p2". So the strcmp() arguments should be in the order (p1,p2) instead of (p2,p1).
commit 899bbf310b5fb63f3aad96fde9fce0308039a386 Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com> Date: Sat Apr 13 19:43:10 2013 +0300 pluginfeature: Fix the GstPluginFeature name comparison. The gst_plugin_feature_rank_compare_func() should return negative value, if the rank of both PluginFeatures are equal and the name of first PluginFeature comes before the second one. https://bugzilla.gnome.org/show_bug.cgi?id=697990
It seems that the decodebin and playbin using descending order for name based sorting if ranks are the same. The comments are saying that , /* And if it's a both a parser we first sort by rank and then by factory name */ IMHO, it would be bit more clear if we change it to ascending order or change the comment description at least. What do you think?
Yes, ascending order makes more sense
Okay,,I will submit a patch later today..Thanks
Created attachment 241552 [details] [review] decodebin: use ascending order for name based sorting of pluginfeatures. The _decode_bin_compare_factories_func() should return negative value if the rank of both PluginFeatures are equal and the name of first PluginFeature comes before the second one (== ascending order).
Created attachment 241553 [details] [review] playbin: use ascending order for name based sorting of pluginfeatures. The compare_factories_func() should return negative value if the rank of both PluginFeatures are equal and the name of first PluginFeature comes before the second one (== ascending order).