The format list should be sorted from high ranks to low ranks. In the GSList
sorting function this means the compare needs to return a positive value if
format a has a lower rank than format b.
Among other things this fixes v4l2src to prefer non-emulated formats
to emulated formats when built against libv4l.
if (fa->pixelformat == fb->pixelformat)
return 0;
- return gst_v4l2_object_format_get_rank (fa) -
- gst_v4l2_object_format_get_rank (fb);
+ return gst_v4l2_object_format_get_rank (fb) -
+ gst_v4l2_object_format_get_rank (fa);
}
/******************************************************